コード例 #1
0
 @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);
 }
コード例 #2
0
 @Override
 public void deploy(TargetModuleID targetModuleID) throws Exception {
   ROOT_LOGGER.beginDeploy(targetModuleID);
   String deploymentName = targetModuleID.getModuleID();
   DeploymentPlanBuilder builder = deploymentManager.newDeploymentPlan();
   builder = builder.add(deploymentName, new URL(deploymentName)).andDeploy();
   DeploymentPlan plan = builder.build();
   DeploymentAction deployAction = builder.getLastAction();
   executeDeploymentPlan(plan, deployAction);
   ROOT_LOGGER.endDeploy(targetModuleID);
 }
コード例 #3
0
 @Override
 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);
     }
   }
 }