Package javax.enterprise.deploy.spi

Examples of javax.enterprise.deploy.spi.DeploymentManager.distribute()


                if (null == targets) {
                    throw new IllegalStateException("No target to distribute to");
                }
                targets = new Target[] {targets[0]};
               
                ProgressObject po = mgr.distribute(targets, null, tempFile);
                waitForProgress(po);
                if (po.getDeploymentStatus().isCompleted()) {
                    TargetModuleID[] ids = po.getResultTargetModuleIDs();
                    po = mgr.start(ids);
                    waitForProgress(po);
View Full Code Here


                if (null == targets) {
                    throw new IllegalStateException("No target to distribute to");
                }
                targets = new Target[] {targets[0]};
               
                ProgressObject progress = mgr.distribute(targets, moduleFile, planFile);
                while (progress.getDeploymentStatus().isRunning()) {
                    Thread.sleep(100);
                }

                String abbrStatusMessage;
View Full Code Here

                    if(targets.length == 0) {
                        throw new PortletException("Unable to identify modules to replace.  Please include a Geronimo deployment plan or use the command-line deployment tool.");
                    }
                    progress = mgr.redeploy(targets, moduleFile, planFile);
                } else {
                    progress = mgr.distribute(new Target[] {all[0]}, moduleFile, planFile);
                }
                while(progress.getDeploymentStatus().isRunning()) {
                    Thread.sleep(100);
                }
               
View Full Code Here

                    if (null == targets) {
                        throw new IllegalStateException("No target to distribute to");
                    }
                    targets = new Target[] {targets[0]};
                   
                    ProgressObject po = mgr.distribute(targets, rarFile, tempFile);
                    waitForProgress(po);
                    if(po.getDeploymentStatus().isCompleted()) {
                        TargetModuleID[] ids = po.getResultTargetModuleIDs();
                        po = mgr.start(ids);
                        waitForProgress(po);
View Full Code Here

                    if (null == targets) {
                        throw new IllegalStateException("No target to distribute to");
                    }
                    targets = new Target[] {targets[0]};
                   
                    ProgressObject po = mgr.distribute(targets, rarFile, tempFile);
                    waitForProgress(po);
                    if (po.getDeploymentStatus().isCompleted()) {
                        TargetModuleID[] ids = po.getResultTargetModuleIDs();
                        po = mgr.start(ids);
                        waitForProgress(po);
View Full Code Here

            }
            targets = new Target[] {targets[0]};

            ProgressObject po;
            if (DeployUtils.isJarFile(file) || file.isDirectory()) {
                po = mgr.distribute(targets, file, null);
            } else {
                po = mgr.distribute(targets, null, file);
            }
            waitForProgress(po);
            if (po.getDeploymentStatus().isCompleted()) {
View Full Code Here

            ProgressObject po;
            if (DeployUtils.isJarFile(file) || file.isDirectory()) {
                po = mgr.distribute(targets, file, null);
            } else {
                po = mgr.distribute(targets, null, file);
            }
            waitForProgress(po);
            if (po.getDeploymentStatus().isCompleted()) {
                modules = po.getResultTargetModuleIDs();
                po = mgr.start(modules);
View Full Code Here

        DeploymentManager manager = getDeploymentManager();

        Target[] targets = manager.getTargets();
        File moduleFile = (getModule() == null)? null: getFile(getModule());
        File planFile = (getPlan() == null)? null: getFile((getPlan()));
        ProgressObject progress = manager.distribute(targets, moduleFile, planFile);
        DeploymentClient.waitFor(progress);
    }

    private File getFile(String location) throws MalformedURLException {
      try {
View Full Code Here

                PrintWriter out = new PrintWriter(new FileWriter(tempFile));
                savePlanToStream(plan, out);
                out.flush();
                out.close();
                Target[] targets = mgr.getTargets();
                ProgressObject po = mgr.distribute(targets, null, tempFile);
                waitForProgress(po);
                if (po.getDeploymentStatus().isCompleted()) {
                    TargetModuleID[] ids = po.getResultTargetModuleIDs();
                    po = mgr.start(ids);
                    waitForProgress(po);
View Full Code Here

                    BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(tempFile));
                    config.save(out);
                    out.flush();
                    out.close();
                    Target[] targets = mgr.getTargets();
                    ProgressObject po = mgr.distribute(targets, rarFile, tempFile);
                    waitForProgress(po);
                    if(po.getDeploymentStatus().isCompleted()) {
                        TargetModuleID[] ids = po.getResultTargetModuleIDs();
                        po = mgr.start(ids);
                        waitForProgress(po);
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.