Examples of newDeploymentPlan()


Examples of org.jboss.as.controller.client.helpers.domain.DomainDeploymentManager.newDeploymentPlan()

    }

    private boolean runDeploymentPlan() throws Exception {

        DomainDeploymentManager deploymentManager = client.getDeploymentManager();
        DeploymentPlanBuilder builder = deploymentManager.newDeploymentPlan();
        ModelNode model = getDomainModel();
        DeploymentActionsCompleteBuilder completionBuilder = null;
        String serverGroup = null;
        Set<String> includedGroups = new HashSet<String>();
        do {
View Full Code Here

Examples of org.jboss.as.controller.client.helpers.domain.DomainDeploymentManager.newDeploymentPlan()

    @Override
    public Status execute() throws DeploymentExecutionException, DeploymentFailureException {
        try {
            validate();
            final DomainDeploymentManager manager = client.getDeploymentManager();
            final DeploymentPlanBuilder builder = manager.newDeploymentPlan();
            DeploymentPlan plan = createPlan(builder);
            if (plan != null) {
                executePlan(manager, plan);
            }
        } catch (DeploymentFailureException e) {
View Full Code Here

Examples of org.jboss.as.controller.client.helpers.domain.DomainDeploymentManager.newDeploymentPlan()

            WebArchive archive = ShrinkWrap.create(WebArchive.class, "env-test.war").addClass(EnvironmentTestServlet.class);
            archive.addAsResource(new StringAsset("Manifest-Version: 1.0\nDependencies: org.jboss.dmr \n"),"META-INF/MANIFEST.MF");

            final InputStream contents = archive.as(ZipExporter.class).exportAsInputStream();
            try {
                DeploymentPlan plan = manager.newDeploymentPlan().add("env-test.war", contents).deploy("env-test.war").toServerGroup("main-server-group").toServerGroup("other-server-group").build();
                DeploymentPlanResult result = manager.execute(plan).get();
                Assert.assertTrue(result.isValid());
            } finally {
                IoUtils.safeClose(contents);
            }
View Full Code Here

Examples of org.jboss.as.controller.client.helpers.domain.DomainDeploymentManager.newDeploymentPlan()

            Assert.assertFalse(env.containsKey("DOMAIN_TEST_MAIN_GROUP"));
            Assert.assertFalse(env.containsKey("DOMAIN_TEST_SERVER"));
            Assert.assertFalse(env.containsKey("DOMAIN_TEST_JVM"));

        } finally {
            DeploymentPlanResult result = manager.execute(manager.newDeploymentPlan().undeploy("env-test.war").build()).get();
            Assert.assertTrue(result.isValid());
            IoUtils.safeClose(client);
        }
    }
View Full Code Here

Examples of org.jboss.as.controller.client.helpers.domain.DomainDeploymentManager.newDeploymentPlan()

    @Override
    public Status execute() throws DeploymentExecutionException, DeploymentFailureException {
        try {
            validate();
            final DomainDeploymentManager manager = client.getDeploymentManager();
            final DeploymentPlanBuilder builder = manager.newDeploymentPlan();
            DeploymentPlan plan = createPlan(builder);
            if (plan != null) {
                executePlan(manager, plan);
            }
        } catch (DeploymentFailureException e) {
View Full Code Here

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

            @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

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

            @Override
            public void fullReplace() {
                final InputStream is = archive.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

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

                }
            }

            @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

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

        testDeployments(client, new DeploymentExecutor() {

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

            @Override
View Full Code Here

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

                awaitDeploymentExecution(future);
            }

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

            @Override
            public void undeploy() {
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.