Package javax.enterprise.deploy.spi

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


           if (found.length == 0) {
               throw new MojoExecutionException("Module not deployed: " + moduleId);
           }

           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);
           }
View Full Code Here


        if (toStop.size() == 0) {
            System.out.println("Module is not running or not deployed: " + getId());
            return;
        }
        moduleIds = (TargetModuleID[]) toStop.toArray(new TargetModuleID[toStop.size()]);
        ProgressObject progress = manager.stop(moduleIds);
        DeploymentClient.waitFor(progress);
    }

}
View Full Code Here

        if (toStop.size() == 0) {
            System.out.println("Module is not running or not deployed: " + getId());
            return;
        }
        moduleIds = (TargetModuleID[]) toStop.toArray(new TargetModuleID[toStop.size()]);
        ProgressObject progress = manager.stop(moduleIds);
        DeploymentClient.waitFor(progress);
    }

}
View Full Code Here

            targetModuleID = modules[0];
            moduleID = targetModuleID.getModuleID();
            assertTrue("Ends with deployment-app.ear", moduleID.endsWith("deployment-app.ear"));

            ProgressObject operationProgress = manager.stop(modules);
            awaitCompletion(operationProgress, TIMEOUT);

            // Test getRunningModules
            modules = manager.getRunningModules(ModuleType.EAR, targets);
            assertEquals("after stopping deployment-app.ear, running EAR modules count expected to be zero" + modules, 0, modules.length);
View Full Code Here

           if (found.length == 0) {
               throw new MojoExecutionException("Module not deployed: " + moduleId);
           }

           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);
           }
View Full Code Here

           if (found.length == 0) {
               throw new MojoExecutionException("Module not deployed: " + moduleId);
           }

           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);
           }
View Full Code Here

           if (found.length == 0) {
               throw new MojoExecutionException("Module not deployed: " + moduleId);
           }

           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);
           }
View Full Code Here

      child = (TargetModuleIDImpl) parent.getChildTargetModuleID()[1];
      assertTrue("wrong state", child.isRunning());
      assertTrue("wrong type " + child.getModuleType(), child.getModuleType().equals(ModuleType.EJB) || child.getModuleType().equals(ModuleType.WAR));
      assertEquals("child have no child", child.getChildTargetModuleID().length, 0);

      parentProgress = manager.stop(new TargetModuleID[] { parent });
      waitForCompletion(parentProgress.getDeploymentStatus());

      modules = manager.getNonRunningModules(ModuleType.EAR, manager.getTargets());
      assertNotNull(modules);
      assertEquals("one EAR module in the server", modules.length, 1);
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());
View Full Code Here

           if (found.length == 0) {
               throw new MojoExecutionException("Module not deployed: " + moduleId);
           }

           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);
           }
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.