Examples of DeploymentPlan


Examples of org.jboss.as.controller.client.helpers.domain.DeploymentPlan

        while (serverGroup == null && completionBuilder != null);

        if (completionBuilder != null) {
            includedGroups.add(serverGroup);
            ServerGroupDeploymentPlanBuilder groupPlanBuilder = completionBuilder.toServerGroup(serverGroup);
            DeploymentPlan plan = completeDeploymentPlan(groupPlanBuilder, model, includedGroups);
            if (plan != null) {
                Future<DeploymentPlanResult> future = deploymentManager.execute(plan);
                writeDeploymentPlanResult(future.get());
            }
        }
View Full Code Here

Examples of org.jboss.as.controller.client.helpers.domain.DeploymentPlan

    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) {
            throw e;
View Full Code Here

Examples of org.jboss.as.controller.client.helpers.standalone.DeploymentPlan

    public synchronized void undeploy() throws ExecutionException, InterruptedException {
        DeploymentPlanBuilder builder = manager.newDeploymentPlan();
        for (AbstractDeployment deployment : deployments) {
            builder = deployment.removeDeployment(builder);
        }
        DeploymentPlan plan = builder.build();
        if (plan.getDeploymentActions().size() > 0) {
            manager.execute(builder.build()).get();
        }
    }
View Full Code Here

Examples of org.jboss.as.controller.client.helpers.standalone.DeploymentPlan

            // Build and execute the deployment plan
            InputStream inputStream = dep.getRoot().openStream();
            DeploymentPlanBuilder builder = deploymentManager.newDeploymentPlan();
            builder = builder.add(contextName, inputStream).andDeploy();
            DeploymentPlan plan = builder.build();
            DeploymentAction deployAction = builder.getLastAction();
            executeDeploymentPlan(plan, deployAction);

        } catch (RuntimeException rte) {
            throw rte;
View Full Code Here

Examples of org.jboss.as.controller.client.helpers.standalone.DeploymentPlan

        try {
            // Undeploy through the deployment manager
            DeploymentPlanBuilder builder = deploymentManager.newDeploymentPlan();
            String contextName = DeploymentHolderService.getContextName(dep);
            builder = builder.undeploy(contextName).remove(contextName);
            DeploymentPlan plan = builder.build();
            DeploymentAction removeAction = builder.getLastAction();
            executeDeploymentPlan(plan, removeAction);
        } catch (Exception ex) {
            ROOT_LOGGER.cannotUndeployBundle(ex, dep);
        }
View Full Code Here

Examples of org.jboss.as.controller.client.helpers.standalone.DeploymentPlan

    }

    @Override
    public void deploy(final URL archiveURL) throws Exception {
        final DeploymentPlanBuilder builder = deploymentManager.newDeploymentPlan().add(archiveURL).andDeploy();
        final DeploymentPlan plan = builder.build();
        final DeploymentAction deployAction = builder.getLastAction();
        final String uniqueId = deployAction.getDeploymentUnitUniqueName();
        executeDeploymentPlan(plan, deployAction);
        url2Id.put(archiveURL, uniqueId);
    }
View Full Code Here

Examples of org.jboss.as.controller.client.helpers.standalone.DeploymentPlan

    public void undeploy(final URL archiveURL) throws Exception {
        final DeploymentPlanBuilder builder = deploymentManager.newDeploymentPlan();
        final String uniqueName = url2Id.get(archiveURL);
        if (uniqueName != null) {
            final DeploymentPlan plan = builder.undeploy(uniqueName).remove(uniqueName).build();
            final DeploymentAction deployAction = builder.getLastAction();
            try {
                executeDeploymentPlan(plan, deployAction);
            } finally {
                url2Id.remove(archiveURL);
View Full Code Here

Examples of org.jboss.as.controller.client.helpers.standalone.DeploymentPlan

        return shutdown;
    }

    @Override
    public DeploymentPlan build() {
        DeploymentPlan dp = new DeploymentPlanImpl(Collections.unmodifiableList(deploymentActions), globalRollback, shutdown, gracefulShutdownPeriod);
        cleanupInFinalize = false;
        return dp;
    }
View Full Code Here

Examples of org.jboss.as.controller.client.helpers.standalone.DeploymentPlan

    // 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.DeploymentPlan

        try {
            final InputStream input = archive.as(ZipExporter.class).exportAsInputStream();
            try {
                DeploymentPlanBuilder builder = deploymentManager.newDeploymentPlan();
                builder = builder.add(archive.getName(), input).andDeploy();
                DeploymentPlan plan = builder.build();
                DeploymentAction deployAction = builder.getLastAction();
                return executeDeploymentPlan(plan, deployAction);
            } finally {
                if(input != null) try {
                    input.close();
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.