Package javax.enterprise.deploy.spi.status

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


            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

        //
       
        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

            }

            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

           }

           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

          }

          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

      {
         return; // Done
      }
      if (progress != null)
      {
         DeploymentStatus state = progress.getDeploymentStatus();
         jsr88Undeploy(progress.getResultTargetModuleIDs());
         if (state.getState() != StateType.FAILED)
            fail("Test deployment deployement should have failed");
      }
      return; // Done
   }
View Full Code Here

      DeploymentManager manager = getDeploymentManager();
      Target[] targets = manager.getTargets();
      assertEquals(1, targets.length);

      ProgressObject progress = manager.stop(resultTargetModuleIDs);
      DeploymentStatus status = progress.getDeploymentStatus();
      waitForCompletion(status);

      // Check the webapp is undeployed
      assertEquals(status.getMessage(), StateType.COMPLETED, status.getState());

      progress = manager.undeploy(resultTargetModuleIDs);
      status = progress.getDeploymentStatus();
      waitForCompletion(status);
      assertEquals(status.getMessage(), StateType.COMPLETED, status.getState());
   }
View Full Code Here

      File moduleArchive = new File(new URI(getDeployURL(module).toString()));
      assertTrue(moduleArchive.exists());

      // Deploy the test war
      ProgressObject progress = manager.distribute(targets, moduleArchive, deploymentPlan);
      DeploymentStatus status = progress.getDeploymentStatus();
      waitForCompletion(status);

      assertEquals(status.getMessage(), StateType.COMPLETED, status.getState());

      TargetModuleID[] moduleIDs = progress.getResultTargetModuleIDs();
      progress = manager.start(moduleIDs);
      status = progress.getDeploymentStatus();
      waitForCompletion(status);
View Full Code Here

                    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

TOP

Related Classes of javax.enterprise.deploy.spi.status.DeploymentStatus

Copyright © 2018 www.massapicom. 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.