Package org.jboss.deployers.spi.management.deploy

Examples of org.jboss.deployers.spi.management.deploy.DeploymentProgress


   * @throws Exception
   */
  public static void undeployFromAS(String archiveName) throws Exception {
    DeploymentManager deploymentManager = getDeploymentManager();

    DeploymentProgress progress = deploymentManager.remove(archiveName);
    progress.run();

    DeploymentStatus status = progress.getDeploymentStatus();

    if (status.isFailed()) {
      throw new IllegalStateException("Failed to undeploy " + archiveName
          + " with message: " + status.getMessage());
    }
View Full Code Here


      try
      {
         for(int i = 0; i < 5; i++)
         {
            //
            DeploymentProgress start = distributeAndStart(NESTED_DEPLOYMENT, true, false);
            assertComplete(start);
           
            // disable stopped check, as it was started before
            start = distributeAndStart(NESTED_DEPLOYMENT, true, false);
            assertComplete(start);
View Full Code Here

      }
   }
  
   void deployFailed(boolean isCopyContent) throws Exception
   {
      DeploymentProgress start = distributeAndStart(FAILING_DEPLOYMENT, isCopyContent);
      assertFailed(start);
      assertDeploymentState(start.getDeploymentID(), DeploymentState.FAILED);
   }
View Full Code Here

      assertDeploymentState(start.getDeploymentID(), DeploymentState.FAILED);
   }

   void deployEmpty(boolean isCopyContent) throws Exception
   {
      DeploymentProgress start = distributeAndStart(EMTPY_DEPLOYMENT, isCopyContent);
      assertComplete(start);
      assertDeploymentState(start.getDeploymentID(), DeploymentState.STARTED);
   }
View Full Code Here

   {
      // The deployment manager
      DeploymentManager deployMgr = getDeploymentManager();

      // Distribute
      DeploymentProgress distribute = deployMgr.distribute(deploymentName,
            getDeployURL(deploymentName), copyContent);
      distribute.run();
      // Distribute always has to complete
      assertComplete(distribute);
      // check if the app is stopped
      if(checkStopped)
         assertDeploymentState(distribute.getDeploymentID(), DeploymentState.STOPPED);

      // Get the repository names
      String[] uploadedNames = distribute.getDeploymentID().getRepositoryNames();
      assertNotNull(uploadedNames);

      // Start
      DeploymentProgress start = deployMgr.start(uploadedNames);
      start.run();
      // Return the start deployment progress
      return start;
   }
View Full Code Here

   {
      // The deployment manager
      DeploymentManager deployMgr = getDeploymentManager();

      // Redeploy
      DeploymentProgress redeploy = deployMgr.redeploy(name);
      redeploy.run();
      assertComplete(redeploy);
      assertDeploymentState(redeploy.getDeploymentID(), DeploymentState.STARTED);
   }
View Full Code Here

   {
      // The deployment manager
      DeploymentManager deployMgr = getDeploymentManager();

      // Prepare
      DeploymentProgress prepare = deployMgr.prepare(name);
      prepare.run();
      assertComplete(prepare);
   }
View Full Code Here

      // The deployment manager
      DeploymentManager deployMgr = getDeploymentManager();

      try
      {
         DeploymentProgress stop = deployMgr.stop(names);
         stop.run();
         assertComplete(stop);
         assertDeploymentState(stop.getDeploymentID(), DeploymentState.STOPPED);
      }
      catch(Exception e)
      {
         log.debug("stopAndRemove Failed ", e);
         throw e;
      }
      finally
      {
         DeploymentProgress remove = deployMgr.remove(names);
         remove.run();
         assertComplete(remove);

         String name = remove.getDeploymentID().getNames()[0];
         ManagementView mgtView = getManagementView();
         try
         {
            mgtView.getDeployment(name);
            fail("Did not see NoSuchDeploymentException");
View Full Code Here

                  return;

               String[] names = jarNames.split(",");
               for (String name : names)
               {
                  DeploymentProgress distribute = getDeploymentManager().distribute(name, getManagedURL(name), copyContent);
                  //distribute.addProgressListener(LOG_PROGRESS_LISTENER);
                  distribute.run();
                  checkProgress(distribute);

                  deploymentNames.addAll(Arrays.asList(distribute.getDeploymentID().getRepositoryNames()));
               }
              
               // Check the resolution of repository names
               assertTrue("resolve repsoitory names",
                     Arrays.asList(getDeploymentManager().getRepositoryNames(names)).containsAll(deploymentNames));
              
              
               DeploymentProgress start = getDeploymentManager().start(deploymentNames.toArray(new String[ deploymentNames.size()]));
               start.run();
               checkProgress(start);

               staticLog.info("Deployed package: " + deploymentNames);
            }
            catch (Exception ex)
            {
               // Throw this in testServerFound() instead.
               deploymentException = ex;
               staticLog.error("Caught exception when trying to deploy : " + jarNames, ex);
            }
         }

         protected void tearDown() throws Exception
         {
            if (jarNames == null)
               return;

            DeploymentProgress stop = getDeploymentManager().stop(deploymentNames.toArray(new String[ deploymentNames.size()]));
            stop.run();
            checkProgress(stop);

            DeploymentProgress undeploy = getDeploymentManager().remove(deploymentNames.toArray(new String[ deploymentNames.size()]));
            undeploy.run();
            checkProgress(undeploy);

            // Clear names
            this.deploymentNames.clear();
           
View Full Code Here

      // Remove
      mgtView.removeComponent(remove);
      mgtView.process();
     
      // Redeploy
      DeploymentProgress progress = getDeploymentManager().redeploy(test1.getDeployment().getName());
      progress.run();
     
      mgtView = getManagementView();
      remove = mgtView.getComponent("ProfileServiceTestRemoveDataSource", locaDSType);
      assertNull(remove);     
   }
View Full Code Here

TOP

Related Classes of org.jboss.deployers.spi.management.deploy.DeploymentProgress

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.