Examples of newDeploymentPlan()


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

                awaitDeploymentExecution(future);
            }

            @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()

    // using DRM call for undeployment
    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(MBEAN + ".jar").build();
                deploymentManager.execute(plan).get(10, TimeUnit.SECONDS);
                return null;
            }
        };
    }
View Full Code Here

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

        @Override
        public void setup(final ManagementClient managementClient, final String containerId) throws Exception {
            ServerDeploymentManager manager = ServerDeploymentManager.Factory.create(managementClient.getControllerClient());
            final String packageName = DeployedXmlDataSourceManagementTestCase.class.getPackage().getName().replace(".", "/");
            final DeploymentPlan plan = manager.newDeploymentPlan().add(DeployedXmlDataSourceManagementTestCase.class.getResource("/" + packageName + "/" + TEST_DS_XML)).andDeploy().build();
            final Future<ServerDeploymentPlanResult> future = manager.execute(plan);
            final ServerDeploymentPlanResult result = future.get(20, TimeUnit.SECONDS);
            final ServerDeploymentActionResult actionResult = result.getDeploymentActionResult(plan.getId());
            if (actionResult != null) {
                if (actionResult.getDeploymentException() != null) {
View Full Code Here

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

        }

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

    @ContainerResource
View Full Code Here

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

        @Override
        public void setup(final ManagementClient managementClient, final String containerId) throws Exception {
            final ServerDeploymentManager manager = ServerDeploymentManager.Factory.create(managementClient.getControllerClient());
            final String packageName = DeployedXmlDataSourceTestCase.class.getPackage().getName().replace(".", "/");
            final DeploymentPlan plan = manager.newDeploymentPlan().add(DeployedXmlDataSourceTestCase.class.getResource("/" + packageName + "/" + TEST_DS_XML)).andDeploy().build();
            final Future<ServerDeploymentPlanResult> future = manager.execute(plan);
            final ServerDeploymentPlanResult result = future.get(20, TimeUnit.SECONDS);
            final ServerDeploymentActionResult actionResult = result.getDeploymentActionResult(plan.getId());
            if (actionResult != null) {
                if (actionResult.getDeploymentException() != null) {
View Full Code Here

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

        }

        @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

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

    }

    @Test
    public void testFileSuccess() throws IOException {
        ServerDeploymentManager sdm = new MockServerDeploymentManager();
        DeploymentPlanBuilder builder = sdm.newDeploymentPlan();
        builder = builder.add("test", createTempFile());
        DeploymentPlanImpl planImpl = getDeploymentPlanImpl(builder);
        safeGet(sdm, planImpl);
        InputStream is = getInputStream(planImpl);
        assertClosed(is);
View Full Code Here

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

    }

    @Test
    public void testURLSuccess() throws IOException {
        ServerDeploymentManager sdm = new MockServerDeploymentManager();
        DeploymentPlanBuilder builder = sdm.newDeploymentPlan();
        builder = builder.add("test", createTempURL());
        DeploymentPlanImpl planImpl = getDeploymentPlanImpl(builder);
        safeGet(sdm, planImpl);
        InputStream is = getInputStream(planImpl);
        assertClosed(is);
View Full Code Here

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

    }

    @Test
    public void testStreamSuccess() throws IOException {
        ServerDeploymentManager sdm = new MockServerDeploymentManager();
        DeploymentPlanBuilder builder = sdm.newDeploymentPlan();
        createTempInputStream();
        builder = builder.add("test", testStream);
        DeploymentPlanImpl planImpl = getDeploymentPlanImpl(builder);
        safeGet(sdm, planImpl);
        assertNotClosed(testStream);
View Full Code Here

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

    }

    @Test
    public void testSuccessfulCancel() throws IOException {
        ServerDeploymentManager sdm = new MockServerDeploymentManager(true);
        DeploymentPlanBuilder builder = sdm.newDeploymentPlan();
        builder = builder.add("test", createTempFile());
        DeploymentPlanImpl planImpl = getDeploymentPlanImpl(builder);
        safeCancel(sdm, planImpl);
        InputStream is = getInputStream(planImpl);
        assertClosed(is);
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.