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

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


        @Override
        public void tearDown(final ManagementClient managementClient, final String containerId) throws Exception {
            final ServerDeploymentManager manager = ServerDeploymentManager.Factory.create(managementClient.getControllerClient());
            final DeploymentPlan undeployPlan = manager.newDeploymentPlan().undeploy(TEST_DS_XML).andRemoveUndeployed().build();
            manager.execute(undeployPlan).get();
        }
    }

    public static final String TEST_DS_XML = "test-ds.xml";
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 DeploymentPlan plan = createPlan(builder);
                if (plan == null) {
                    getLog().debug(String.format("Ignoring goal %s as the plan was null.", goal()));
                } else {
                    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

            @Override
            public void initialDeploy() {
                final InputStream is = archive.as(ZipExporter.class).exportAsInputStream();
                try {
                    Future<?> future = manager.execute(manager.newDeploymentPlan()
                            .add("test-deployment.sar", is).deploy("test-deployment.sar").build());
                    awaitDeploymentExecution(future);
                } finally {
                    if (is != null) try {
                        is.close();
View Full Code Here

            @Override
            public void fullReplace() {
                final InputStream is = archive2.as(ZipExporter.class).exportAsInputStream();
                try {
                    Future<?> future = manager.execute(manager.newDeploymentPlan()
                            .replace("test-deployment.sar", is).build());
                    awaitDeploymentExecution(future);
                } finally {
                    if (is != null) try {
                        is.close();
View Full Code Here

                }
            }

            @Override
            public void undeploy() {
                Future<?> future = manager.execute(manager.newDeploymentPlan().undeploy("test-deployment.sar")
                        .remove("test-deployment.sar").build());
                awaitDeploymentExecution(future);
            }
        });
    }
View Full Code Here

        testDeployments(client, false, new DeploymentExecutor() {

            @Override
            public void initialDeploy() throws IOException {
                Future<?> future = manager.execute(manager.newDeploymentPlan().add("test-deployment.sar", exportArchive(archive))
                        .deploy("test-deployment.sar").build());
                awaitDeploymentExecution(future);
            }

            @Override
View Full Code Here

                awaitDeploymentExecution(future);
            }

            @Override
            public void fullReplace() throws IOException {
                Future<?> future = manager.execute(manager.newDeploymentPlan().replace("test-deployment.sar", exportArchive(archive2)).build());
                awaitDeploymentExecution(future);
            }

            @Override
            public void undeploy() {
View Full Code Here

                awaitDeploymentExecution(future);
            }

            @Override
            public void undeploy() {
                Future<?> future = manager.execute(manager.newDeploymentPlan().undeploy("test-deployment.sar")
                        .remove("test-deployment.sar").build());
                awaitDeploymentExecution(future);
            }

            private File exportArchive(JavaArchive archive) {
View Full Code Here

    private Callable<Void> undeployTask() {
        return new Callable<Void>() {
            public Void call() throws Exception {
                ServerDeploymentManager deploymentManager = ServerDeploymentManager.Factory.create(managementClient.getControllerClient());
                final DeploymentPlan plan = deploymentManager.newDeploymentPlan().undeploy(MESSAGE_DRIVEN_BEAN + ".jar").build();
                deploymentManager.execute(plan).get(UNDEPLOYED_WAIT_S, SECONDS);
                return null;
            }
        };
    }
}
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.