Package org.jboss.as.controller.client.helpers.standalone

Examples of org.jboss.as.controller.client.helpers.standalone.ServerDeploymentManager.execute()


            final ServerDeploymentManager manager = ServerDeploymentManager.Factory.create(client);
            final DeploymentPlanBuilder builder = manager.newDeploymentPlan();
            final DeploymentPlan plan = createPlan(builder);
            if (plan != null) {
                if (plan.getDeploymentActions().size() > 0) {
                    final ServerDeploymentPlanResult planResult = manager.execute(plan).get();
                    // Check the results
                    for (DeploymentAction action : plan.getDeploymentActions()) {
                        final ServerDeploymentActionResult actionResult = planResult.getDeploymentActionResult(action.getId());
                        final ServerUpdateActionResult.Result result = actionResult.getResult();
                        switch (result) {
View Full Code Here


                }
                final ServerDeploymentManager manager = ServerDeploymentManager.Factory.create(client());
                final DeploymentPlanBuilder builder = manager.newDeploymentPlan();
                final DeploymentPlan plan = createPlan(builder);
                if (plan.getDeploymentActions().size() > 0) {
                    final ServerDeploymentPlanResult planResult = manager.execute(plan).get();
                    // Check the results
                    for (DeploymentAction action : plan.getDeploymentActions()) {
                        final ServerDeploymentActionResult actionResult = planResult.getDeploymentActionResult(action.getId());
                        final ServerUpdateActionResult.Result result = actionResult.getResult();
                        switch (result) {
View Full Code Here

            final ServerDeploymentManager manager = ServerDeploymentManager.Factory.create(client);
            final DeploymentPlanBuilder builder = manager.newDeploymentPlan();
            final DeploymentPlan plan = createPlan(builder);
            if (plan != null) {
                if (plan.getDeploymentActions().size() > 0) {
                    final ServerDeploymentPlanResult planResult = manager.execute(plan).get();
                    // Check the results
                    for (DeploymentAction action : plan.getDeploymentActions()) {
                        final ServerDeploymentActionResult actionResult = planResult.getDeploymentActionResult(action.getId());
                        final ServerUpdateActionResult.Result result = actionResult.getResult();
                        switch (result) {
View Full Code Here

            }
            final ServerDeploymentManager manager = ServerDeploymentManager.Factory.create(client());
            final DeploymentPlanBuilder builder = manager.newDeploymentPlan();
            final DeploymentPlan plan = createPlan(builder);
            if (plan.getDeploymentActions().size() > 0) {
                final ServerDeploymentPlanResult result = manager.execute(plan).get();
                getLog().debug(String.format("Deployment Plan Id : %s", result.getDeploymentPlanId()));
            } else {
                getLog().warn(String.format("Goal %s failed on file %s. No deployment actions exist. Plan: %s", goal(), filename(), plan));
            }
        } catch (Exception e) {
View Full Code Here

                getLog().info(String.format("Executing goal %s on server %s (%s) port %s.", goal(), host.getHostName(), host.getHostAddress(), port()));
                final ServerDeploymentManager manager = ServerDeploymentManager.Factory.create(client());
                final DeploymentPlanBuilder builder = manager.newDeploymentPlan();
                final DeploymentPlan plan = createPlan(builder);
                if (plan.getDeploymentActions().size() > 0) {
                    final ServerDeploymentPlanResult planResult = manager.execute(plan).get();
                    // Check the results
                    for (DeploymentAction action : plan.getDeploymentActions()) {
                        final ServerDeploymentActionResult actionResult = planResult.getDeploymentActionResult(action.getId());
                        final ServerUpdateActionResult.Result result = actionResult.getResult();
                        switch (result) {
View Full Code Here

                getLog().info(String.format("Executing goal %s on server %s (%s) port %s.", goal(), host.getHostName(), host.getHostAddress(), port()));
                final ServerDeploymentManager manager = ServerDeploymentManager.Factory.create(client());
                final DeploymentPlanBuilder builder = manager.newDeploymentPlan();
                final DeploymentPlan plan = createPlan(builder);
                if (plan.getDeploymentActions().size() > 0) {
                    final ServerDeploymentPlanResult planResult = manager.execute(plan).get();
                    // Check the results
                    for (DeploymentAction action : plan.getDeploymentActions()) {
                        final ServerDeploymentActionResult actionResult = planResult.getDeploymentActionResult(action.getId());
                        final ServerUpdateActionResult.Result result = actionResult.getResult();
                        switch (result) {
View Full Code Here

        ServerDeploymentManager deploymentManager = ServerDeploymentManager.Factory.create(client);
        InitialDeploymentPlanBuilder builder = deploymentManager.newDeploymentPlan();
        String applName = "wicket-examples1";
        URL applUrl = new URL("mvn:org.apache.wicket/wicket-examples/1.5.3/war");
        DeploymentPlan plan = builder.add(applName, applUrl).andDeploy().build();
        ServerDeploymentPlanResult result = deploymentManager.execute(plan).get();
        UUID actionId = plan.getDeploymentActions().get(0).getId();
        ServerDeploymentActionResult actionResult = result.getDeploymentActionResult(actionId);
        assertThat(actionResult.getResult(), is(Result.EXECUTED));
       
        builder = deploymentManager.newDeploymentPlan();
View Full Code Here

        ServerDeploymentActionResult actionResult = result.getDeploymentActionResult(actionId);
        assertThat(actionResult.getResult(), is(Result.EXECUTED));
       
        builder = deploymentManager.newDeploymentPlan();
        plan = builder.undeploy(applName).andRemoveUndeployed().build();
        result = deploymentManager.execute(plan).get();
        actionId = plan.getDeploymentActions().get(0).getId();
        actionResult = result.getDeploymentActionResult(actionId);
        assertThat(actionResult.getResult(), is(Result.EXECUTED));
       
       
View Full Code Here

        ServerDeploymentManager deploymentManager = ServerDeploymentManager.Factory.create(client);
        InitialDeploymentPlanBuilder builder = deploymentManager.newDeploymentPlan();
        String applName = "wicket-examples.war";
        URL applUrl = new URL("mvn:org.apache.wicket/wicket-examples/1.5.3/war");
        DeploymentPlan plan = builder.add(applName, applUrl).andDeploy().build();
        ServerDeploymentPlanResult result = deploymentManager.execute(plan).get();
        UUID actionId = plan.getDeploymentActions().get(0).getId();
        ServerDeploymentActionResult actionResult = result.getDeploymentActionResult(actionId);
        assertThat(actionResult.getResult(), is(Result.EXECUTED));

        plan = deploymentManager.newDeploymentPlan().undeploy(applName).andRemoveUndeployed()
View Full Code Here

        ServerDeploymentActionResult actionResult = result.getDeploymentActionResult(actionId);
        assertThat(actionResult.getResult(), is(Result.EXECUTED));

        plan = deploymentManager.newDeploymentPlan().undeploy(applName).andRemoveUndeployed()
            .build();
        deploymentManager.execute(plan).get();
        actionResult = result.getDeploymentActionResult(actionId);
        assertThat(actionResult.getResult(), is(Result.EXECUTED));

    }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.