Examples of DeploymentAction


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

    @Override
    public String deploy(URL url) throws Exception {
        DeploymentPlanBuilder builder = deploymentManager.newDeploymentPlan();
        builder = builder.add(url).andDeploy();
        DeploymentPlan plan = builder.build();
        DeploymentAction deployAction = builder.getLastAction();
        return executeDeploymentPlan(plan, deployAction);
    }
View Full Code Here

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

    @Override
    public String deploy(String name, InputStream input) throws Exception {
        DeploymentPlanBuilder builder = deploymentManager.newDeploymentPlan();
        builder = builder.add(name, input).andDeploy();
        DeploymentPlan plan = builder.build();
        DeploymentAction deployAction = builder.getLastAction();
        return executeDeploymentPlan(plan, deployAction);
    }
View Full Code Here

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

    @Override
    public void deploy(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.DeploymentAction

    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.DeploymentAction

    public void deploy(TargetModuleID targetModuleID) throws Exception {
        log.infof("Begin deploy: %s", targetModuleID);
        DeploymentPlanBuilder builder = deploymentManager.newDeploymentPlan();
        builder = builder.add(targetModuleID.getModuleID(), new URL(targetModuleID.getModuleID())).andDeploy();
        DeploymentPlan plan = builder.build();
        DeploymentAction deployAction = builder.getLastAction();
        String runtimeName = executeDeploymentPlan(plan, deployAction);
        runtimeNames.put(targetModuleID, runtimeName);
        log.infof("End deploy: %s", targetModuleID);
    }
View Full Code Here

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

            // 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;
        } catch (BundleException ex) {
View Full Code Here

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

            // 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) {
            log.warn("Cannot undeploy bundle: " + dep, ex);
        }
    }
View Full Code Here

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

    public void deploy(TargetModuleID targetModuleID) throws Exception {
        log.infof("Begin deploy: %s", targetModuleID);
        DeploymentPlanBuilder builder = deploymentManager.newDeploymentPlan();
        builder = builder.add(targetModuleID.getModuleID(), new URL(targetModuleID.getModuleID())).andDeploy();
        DeploymentPlan plan = builder.build();
        DeploymentAction deployAction = builder.getLastAction();
        String runtimeName = executeDeploymentPlan(plan, deployAction);
        runtimeNames.put(targetModuleID, runtimeName);
        log.infof("End deploy: %s", targetModuleID);
    }
View Full Code Here

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

            InputStream inputStream = dep.getRoot().openStream();
            try {
                DeploymentPlanBuilder builder = deploymentManager.newDeploymentPlan();
                builder = builder.add(contextName, inputStream).andDeploy();
                DeploymentPlan plan = builder.build();
                DeploymentAction deployAction = builder.getLastAction();
                executeDeploymentPlan(plan, deployAction);
            } finally {
                if(inputStream != null) try {
                    inputStream.close();
                } catch (IOException e) {
View Full Code Here

Examples of org.jboss.as.domain.client.api.deployment.DeploymentAction

        // Execute domain model update on domain controller and server managers
        List<DomainUpdateApplierResponse> rsps = domainController.applyUpdatesToModel(updateSet.getDomainUpdates());

        // Inform client of results
        pushSingleResponse(responseQueue, new StreamedResponse((byte) DomainClientProtocol.RETURN_DEPLOYMENT_SET_ID, updateSet.setPlan.getId()));
        DeploymentAction lastResponseAction = null;
        for (int i = 0; i < rsps.size(); i++) {
            DomainUpdateApplierResponse duar = rsps.get(i);
            // There can be multiple domain updates for a given action, but we
            // only send one response. Use this update result for the response if
            // 1) it failed or 2) it's the last update associated with the action
            if (duar.getDomainFailure() != null || duar.getHostFailures().size() > 0 || updateSet.isLastDomainUpdateForAction(i)) {
                DeploymentAction action = updateSet.getDeploymentActionForDomainUpdate(i);
                if (action != lastResponseAction) {
                    List<StreamedResponse> rspList = new ArrayList<StreamedResponse>(2);
                    rspList.add(new StreamedResponse((byte) DomainClientProtocol.RETURN_DEPLOYMENT_ACTION_ID, action.getId()));
                    rspList.add(new StreamedResponse((byte) DomainClientProtocol.RETURN_DEPLOYMENT_ACTION_MODEL_RESULT, duar));
                    responseQueue.put(rspList);
                    lastResponseAction = action;
                }
            }
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.