Examples of DeploymentManager


Examples of javax.enterprise.deploy.spi.DeploymentManager

            throw new DeploymentException("This command cannot be run unless connecting to a running server.  Specify --url if server is not running on the default port on localhost.");
        }
        if(args.length == 0) {
            throw new DeploymentSyntaxException("Must specify at least one module name or TargetModuleID");
        }
        DeploymentManager mgr = connection.getDeploymentManager();
        Target[] allTargets = mgr.getTargets();
        TargetModuleID[] allModules = new TargetModuleID[0];
        try {
            allModules = mgr.getAvailableModules(null, allTargets);
        } catch(TargetException e) {
            throw new DeploymentException("Unable to load module list from server", e);
        }
        List modules = new ArrayList();
        for(int i=0; i<args.length; i++) {
View Full Code Here

Examples of javax.enterprise.deploy.spi.DeploymentManager

                }
            } else {
                targets.add(arg);
            }
        }
        final DeploymentManager mgr = connection.getDeploymentManager();
        TargetModuleID[] running = null, notrunning = null;
        Target[] tlist = identifyTargets(targets, mgr);
        if(tlist.length == 0) {
            tlist = mgr.getTargets();
        }
        try {
            if(started == null || started.booleanValue()) {
                running = mgr.getRunningModules(null, tlist);
            }
            if(started == null || !started.booleanValue()) {
                notrunning = mgr.getNonRunningModules(null, tlist);
            }
        } catch (TargetException e) {
            throw new DeploymentException("Unable to query modules", e);
        } catch (IllegalStateException e) {
            throw new DeploymentSyntaxException(e.getMessage());
View Full Code Here

Examples of javax.enterprise.deploy.spi.DeploymentManager

            out.println(getAction()+" "+it.next());
        }
    }

    private void executeOnline(ServerConnection connection, List targets, PrintWriter out, File module, File plan) throws DeploymentException {
        final DeploymentManager mgr = connection.getDeploymentManager();
        TargetModuleID[] results;
        boolean multipleTargets;
        ProgressObject po;
        if(targets.size() > 0) {
            Target[] tlist = identifyTargets(targets, mgr);
            multipleTargets = tlist.length > 1;
            po = runCommand(mgr, out, tlist, module, plan);
            waitForProgress(out, po);
        } else {
            final Target[] tlist = mgr.getTargets();
            multipleTargets = tlist.length > 1;
            po = runCommand(mgr, out, tlist, module, plan);
            waitForProgress(out, po);
        }
View Full Code Here

Examples of org.activiti.engine.impl.persistence.deploy.DeploymentManager

  public String getType() {
    return TYPE;
  }
 
  public void execute(JobEntity job, String configuration, ExecutionEntity execution, CommandContext commandContext) {
    DeploymentManager deploymentCache = Context
            .getProcessEngineConfiguration()
            .getDeploymentManager();
   
    ProcessDefinition processDefinition = null;
    if (job.getTenantId() == null || ProcessEngineConfiguration.NO_TENANT_ID.equals(job.getTenantId())) {
        processDefinition = deploymentCache.findDeployedLatestProcessDefinitionByKey(configuration);
    } else {
      processDefinition = deploymentCache.findDeployedLatestProcessDefinitionByKeyAndTenantId(configuration, job.getTenantId());
    }
   
    if (processDefinition == null) {
      throw new ActivitiException("Could not find process definition needed for timer start event");
    }
View Full Code Here

Examples of org.eclipse.jetty.deploy.DeploymentManager

    private static void scanDirForWebApps(final Server server, final String path) {
        WebAppProvider wap = new WebAppProvider();
        wap.setMonitoredDirName(path);
        wap.setExtractWars(true);

        DeploymentManager dm = new DeploymentManager();
        dm.setContexts(new ContextHandlerCollection());
        dm.addAppProvider(wap);

        server.setHandler(dm.getContexts());
        server.addBean(dm);
    }
View Full Code Here

Examples of org.hornetq.core.deployers.DeploymentManager

   @Override
   protected void setUp() throws Exception
   {
      super.setUp();
      DeploymentManager deploymentManager = new FakeDeploymentManager();
      securityManager = new FakeHornetQUpdateableSecurityManager();
      deployer = new BasicUserCredentialsDeployer(deploymentManager, securityManager);
   }
View Full Code Here

Examples of org.jboss.deployers.spi.management.deploy.DeploymentManager

                createResourceReport.setStatus(CreateResourceStatus.FAILURE);
                createResourceReport.setErrorMessage("Incorrect extension specified on filename [" + archiveName + "]");
                return;
            }

            DeploymentManager deploymentManager = this.profileServiceConnection.getDeploymentManager();
           
            DeploymentUtils.deployArchive(deploymentManager, archiveFile, false);
           
            // Deployment was successful!
            createResourceReport.setResourceName(archiveName);
View Full Code Here

Examples of org.jboss.deployers.spi.management.deploy.DeploymentManager

  }

  @Override
  public void deleteResource() throws Exception {

    DeploymentManager deploymentManager = getConnection()
        .getDeploymentManager();
   
    log.debug("Stopping deployment [" + this.deploymentUrl + "]..."); //$NON-NLS-1$ //$NON-NLS-2$
    DeploymentProgress progress = deploymentManager
        .stop(this.deploymentUrl);
    DeploymentStatus stopStatus = DeploymentUtils.run(progress);
    if (stopStatus.isFailed()) {
      log.error("Failed to stop deployment '" + this.deploymentUrl //$NON-NLS-1$
          + "'.", stopStatus.getFailure()); //$NON-NLS-1$
      throw new Exception("Failed to stop deployment '" //$NON-NLS-1$
          + this.deploymentName + "' - cause: " //$NON-NLS-1$
          + stopStatus.getFailure());
    }
    log.debug("Removing deployment [" + this.deploymentUrl + "]..."); //$NON-NLS-1$ //$NON-NLS-2$
    progress = deploymentManager.remove(this.deploymentUrl);
    DeploymentStatus removeStatus = DeploymentUtils.run(progress);
    if (removeStatus.isFailed()) {
      log.error("Failed to remove deployment '" + this.deploymentUrl //$NON-NLS-1$
          + "'.", removeStatus.getFailure()); //$NON-NLS-1$
      throw new Exception("Failed to remove deployment '" //$NON-NLS-1$
View Full Code Here

Examples of org.jboss.deployers.spi.management.deploy.DeploymentManager

          + "'."); //$NON-NLS-1$
    }

    // Now stop the original app.
    try {
      DeploymentManager deploymentManager = getConnection()
          .getDeploymentManager();
      DeploymentProgress progress = deploymentManager
          .stop(this.deploymentUrl);
      DeploymentUtils.run(progress);
    } catch (Exception e) {
      throw new RuntimeException("Failed to stop deployment [" //$NON-NLS-1$
          + this.deploymentUrl + "].", e); //$NON-NLS-1$
    }

    // And then remove it (this will delete the physical file/dir from the
    // deploy dir).
    try {
      DeploymentManager deploymentManager = getConnection()
          .getDeploymentManager();
      DeploymentProgress progress = deploymentManager
          .remove(this.deploymentUrl);
      DeploymentUtils.run(progress);
    } catch (Exception e) {
      throw new RuntimeException("Failed to remove deployment [" //$NON-NLS-1$
          + this.deploymentUrl + "].", e); //$NON-NLS-1$
    }

    // Deploy away!
    log.debug("Deploying '" + tempFile + "'..."); //$NON-NLS-1$ //$NON-NLS-2$
    DeploymentManager deploymentManager = getConnection()
        .getDeploymentManager();
    try {
      DeploymentUtils.deployArchive(deploymentManager, tempFile,
          deployExploded);
    } catch (Exception e) {
View Full Code Here

Examples of org.jboss.deployers.spi.management.deploy.DeploymentManager

   }

   public void testDeploymentMgrRedeploy() throws Exception
   {
      // Test redeploy using deploymentManager
      DeploymentManager deployMgr = getDeploymentManager();
      // deployMgr.loadProfile(scannerProfile);
      try
      {
         String name = deployMgr.getRepositoryNames(new String[] { DEPLOYMENT })[0];
         redeployCheckComplete(name);
      }
      finally
      {
         deployMgr.releaseProfile();
      }     
   }
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.