Examples of DeploymentStatus


Examples of javax.enterprise.deploy.spi.status.DeploymentStatus

           }

           log.info("Stopping module: " + moduleId);
           ProgressObject progress = manager.stop(found);

           DeploymentStatus status = waitFor(progress);
           if (status.isFailed()) {
               throw new MojoExecutionException("Failed to stop module: " + moduleId);
           }

           log.info("Stopped module(s):");
           logModules(found, "    ");
View Full Code Here

Examples of javax.enterprise.deploy.spi.status.DeploymentStatus

          }

          log.info("Undeploying module: " + moduleId);
          ProgressObject progress = manager.undeploy(found);

          DeploymentStatus status = waitFor(progress);
          if (status.isFailed()) {
              throw new MojoExecutionException("Failed to undeploy module: " + moduleId);
          }

          log.info("Undeployed module(s):");
          logModules(found, "    ");
View Full Code Here

Examples of javax.enterprise.deploy.spi.status.DeploymentStatus

    private void sendEvent(String message, StateType state) {
        assert !Thread.holdsLock(this) : "Trying to send event whilst holding lock";

        ProgressListener[] toNotify;
        DeploymentStatus newStatus;
        synchronized (this) {
            this.message = message;
            this.state = state;
            newStatus = new Status(command, action, state, message);
            toNotify = (ProgressListener[]) listeners.toArray(new ProgressListener[listeners.size()]);
View Full Code Here

Examples of javax.enterprise.deploy.spi.status.DeploymentStatus

                   
                    ProgressObject po = mgr.distribute(targets, rarFile, tempFile);
                    po.addProgressListener(new ProgressListener() {
                       
                        public void handleProgressEvent(ProgressEvent event)  {
                            DeploymentStatus status = event.getDeploymentStatus();
                            String msg = status.getMessage();
                            if (status.isCompleted()) {
                                response.setRenderParameter("successMsg", msg);
                            } else if (status.isFailed()) {
                                response.setRenderParameter("errorMsg", msg);
                            }
                        }
                       
                    });
View Full Code Here

Examples of javax.enterprise.deploy.spi.status.DeploymentStatus

                    String url = moduleIds[i].getWebURL();
                    log.info("Starting module: " + moduleIds[i].getModuleID() + (url == null ? "" : ("; URL: " + url)));
                }

                ProgressObject progress = getDeploymentManager().start(moduleIds);
                DeploymentStatus status = waitFor(progress);

                if (status.isFailed()) {
                    throw new MojoExecutionException("Failed to start modules: " + status.getMessage());
                }

                log.info("Started module(s):");
                logModules(moduleIds, "    ");
            }
View Full Code Here

Examples of javax.enterprise.deploy.spi.status.DeploymentStatus

            throw new IllegalStateException("No target to distribute to");
        }
        targets = new Target[] {targets[0]};
       
        ProgressObject progress = manager.distribute(targets, file, plan);
        DeploymentStatus status = waitFor(progress);

        if (status.isFailed()) {
            //
            // FIXME: There must be a better way to handle this.
            //
            if (status.getMessage().indexOf("already exists") < 0 ) {
                throw new MojoExecutionException("Distribution failed: " + status.getMessage());
            }
            log.info("Module already exists");
        }
       
View Full Code Here

Examples of javax.enterprise.deploy.spi.status.DeploymentStatus

                   
                    ProgressObject po = mgr.distribute(targets, rarFile, tempFile);
                    po.addProgressListener(new ProgressListener() {
                       
                        public void handleProgressEvent(ProgressEvent event)  {
                            DeploymentStatus status = event.getDeploymentStatus();
                            String msg = status.getMessage();
                            if (status.isCompleted()) {
                                response.setRenderParameter("successMsg", msg);
                            } else if (status.isFailed()) {
                                response.setRenderParameter("errorMsg", msg);
                            }
                        }
                       
                    });
View Full Code Here

Examples of javax.enterprise.deploy.spi.status.DeploymentStatus

    public void testDistributeWebApp() throws Exception {
        DeploymentManager manager = getDeploymentManager();
        ProgressObject progress = jsr88Deploy(manager, getWebArchive());
        TargetModuleID[] targetModules = progress.getResultTargetModuleIDs();
        try {
            DeploymentStatus state = progress.getDeploymentStatus();
            assertEquals(StateType.COMPLETED, state.getState());
            assertServletAccess("custom-context");
        } finally {
            jsr88Undeploy(manager, targetModules);
        }
        try {
View Full Code Here

Examples of javax.enterprise.deploy.spi.status.DeploymentStatus

    public void testDistributeBadWar() throws Exception {
        DeploymentManager manager = getDeploymentManager();
        ProgressObject progress = jsr88Deploy(manager, getBadWebArchive());
        TargetModuleID[] targetModules = progress.getResultTargetModuleIDs();
        try {
            DeploymentStatus state = progress.getDeploymentStatus();
            assertEquals(StateType.FAILED, state.getState());
        } finally {
            jsr88Undeploy(manager, targetModules);
        }
    }
View Full Code Here

Examples of javax.enterprise.deploy.spi.status.DeploymentStatus

    public void testDistributeEjbApp() throws Exception {
        DeploymentManager manager = getDeploymentManager();
        ProgressObject progress = jsr88Deploy(manager, getEjbArchive());
        TargetModuleID[] targetModules = progress.getResultTargetModuleIDs();
        try {
            DeploymentStatus state = progress.getDeploymentStatus();
            assertEquals(StateType.COMPLETED, state.getState());
        } finally {
            jsr88Undeploy(manager, targetModules);
        }
    }
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.