Examples of DeploymentStatus


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

        //
       
        ProgressListener listener = new ProgressListener()
        {
            public void handleProgressEvent(final ProgressEvent event) {
                DeploymentStatus status = event.getDeploymentStatus();

                if (!status.isRunning()) {
                    synchronized (progress) {
                        progress.notify();
                    }
                }
            }
View Full Code Here

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

            }

            log.info("Starting module: " + moduleId);
            ProgressObject progress = manager.start(found);
           
            DeploymentStatus status = waitFor(progress);
            if (status.isFailed()) {
                throw new MojoExecutionException("Failed to start module: " + moduleId);
            }
           
            log.info("Started module(s):");
            logModules(found, "    ");
View Full Code Here

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

                    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

    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

            isModuleArchive = new FileInputStream(moduleArchive);
            isDeploymentPlan = new FileInputStream(deploymentPlan);
            return distribute(targets, isModuleArchive, isDeploymentPlan);
        } catch (FileNotFoundException e) {
            String message = MESSAGES.cannotFindDeploymentFile(e.getMessage());
            DeploymentStatus status = new DeploymentStatusImpl(StateType.FAILED, CommandType.DISTRIBUTE, ActionType.EXECUTE, message);
            ROOT_LOGGER.errorf(message);
            return new ProgressObjectImpl(status, null);
        }
    }
View Full Code Here

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

                File contentFile = moduleInfo.getContentFile();
                targetModuleIDs[i] = new TargetModuleIDImpl(target, moduleID, null, type, contentFile);
            }
        } catch (IOException e) {
            String message = MESSAGES.deploymentValidationFailed();
            DeploymentStatus status = new DeploymentStatusImpl(StateType.FAILED, CommandType.DISTRIBUTE, ActionType.EXECUTE, message);
            ROOT_LOGGER.errorf(e, message);
            state.cleanup();
            return new ProgressObjectImpl(status, targetModuleIDs);
        }

        // start the deployment process
        DeploymentStatus status = new DeploymentStatusImpl(StateType.RUNNING, CommandType.DISTRIBUTE, ActionType.EXECUTE, null);
        ProgressObject progress = new ProgressObjectImpl(status, targetModuleIDs);

        DeploymentWorker worker = new DeploymentWorker(progress, state);
        worker.start();
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.