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

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


   {
      String names[] = new String[] {deployment};
      DeploymentManager deployMgr = getDeploymentManager();
      try
      {
         DeploymentProgress progress = deployMgr.stop(names);
         progress.run();
         assertFalse("failed: " + progress.getDeploymentStatus().getFailure(), progress.getDeploymentStatus().isFailed());
      }
      finally
      {
         DeploymentProgress progress = deployMgr.remove(names);
         progress.run();
         assertFalse("failed: " + progress.getDeploymentStatus().getFailure(), progress.getDeploymentStatus().isFailed());
      }
   }
View Full Code Here


      int index = contentURLString.indexOf(":/");
      URL contentURL = new URL("vfsfile" + contentURLString.substring(index));

      // distribute the resource deployment.
      DeploymentManager manager = super.getDeploymentManager();
      DeploymentProgress progress = manager.distribute(resourceName, contentURL, true);
      progress.addProgressListener(this.listener);
      progress.run();
     
      assertDeployed(progress);

      // start the deployment.
      String[] uploadedNames = progress.getDeploymentID().getRepositoryNames();
      progress = manager.start(uploadedNames);
      progress.addProgressListener(this.listener);
      progress.run();
     
      assertDeployed(progress);
   }
View Full Code Here

    */
   private void undeployResource(String resourceName) throws Exception
   {
      // stop the resource deployment.
      DeploymentManager manager = super.getDeploymentManager();
      DeploymentProgress progress = manager.stop(resourceName);
      progress.addProgressListener(this.listener);
      progress.run();

      // undeploy the resource.
      progress = manager.remove(resourceName);
      progress.addProgressListener(this.listener);
      progress.run();
   }
View Full Code Here

      return new CompositeValueSupport(composite, map);
   }

   protected void redeploy(String name) throws Exception
   {
      DeploymentProgress progress = getDeploymentManager().redeploy(name);
      progress.run();
      if(progress.getDeploymentStatus().isFailed())
      {
         throw new IllegalStateException("Redeployment failed ", progress.getDeploymentStatus().getFailure());
      }
   }
View Full Code Here

   private void deploy(String deploymentName, URL url) throws DeploymentException
   {
      Exception failure = null;
      try
      {
         DeploymentProgress distribute = deploymentManager.distribute(deploymentName, url, true);
         distribute.run();
         DeploymentStatus uploadStatus = distribute.getDeploymentStatus();
         if(uploadStatus.isFailed())
         {
            failure = uploadStatus.getFailure();
            undeploy(deploymentName);
         }
         else
         {
            DeploymentProgress progress = deploymentManager.start(deploymentName);
            progress.run();
            DeploymentStatus status = progress.getDeploymentStatus();
            if (status.isFailed())
            {
               failure = status.getFailure();
               undeploy(deploymentName);
            }
View Full Code Here

   private void undeploy(String name) throws DeploymentException
   {
      try
      {
         DeploymentProgress stopProgress = deploymentManager.stop(name);
         stopProgress.run();

         DeploymentProgress undeployProgress = deploymentManager.remove(name);
         undeployProgress.run();
         if (undeployProgress.getDeploymentStatus().isFailed())
         {
            failedUndeployments.add(name);
         }
      }
      catch (Exception e)
View Full Code Here

      List<String> remainingDeployments = new ArrayList<String>();
      for (String name : failedUndeployments)
      {
         try
         {
            DeploymentProgress undeployProgress = deploymentManager.remove(name);
            undeployProgress.run();
            if (undeployProgress.getDeploymentStatus().isFailed())
            {
               remainingDeployments.add(name);
            }
         }
         catch (Exception e)
View Full Code Here

   private void deploy(String deploymentName, URL url) throws DeploymentException
   {
      Exception failure = null;
      try
      {
         DeploymentProgress distribute = deploymentManager.distribute(deploymentName, url, true);
         distribute.run();
         DeploymentStatus uploadStatus = distribute.getDeploymentStatus();
         if(uploadStatus.isFailed())
         {
            failure = uploadStatus.getFailure();
            undeploy(deploymentName);
         }
         else
         {
            DeploymentProgress progress = deploymentManager.start(deploymentName);
            progress.run();
            DeploymentStatus status = progress.getDeploymentStatus();
            if (status.isFailed())
            {
               failure = status.getFailure();
               undeploy(deploymentName);
            }
View Full Code Here

  
   private void undeploy(String name) throws DeploymentException
   {
      try
      {
         DeploymentProgress stopProgress = deploymentManager.stop(name);
         stopProgress.run();

         DeploymentProgress undeployProgress = deploymentManager.remove(name);
         undeployProgress.run();
         if (undeployProgress.getDeploymentStatus().isFailed())
         {
            failedUndeployments.add(name);
         }
      }
      catch (Exception e)
View Full Code Here

   private void deploy(String deploymentName, URL url) throws DeploymentException
   {
      Exception failure = null;
      try
      {
         DeploymentProgress distribute = deploymentManager.distribute(deploymentName, url, true);
         distribute.run();
         DeploymentStatus uploadStatus = distribute.getDeploymentStatus();
         if(uploadStatus.isFailed())
         {
            failure = uploadStatus.getFailure();
            undeploy(deploymentName);
         }
         else
         {
            DeploymentProgress progress = deploymentManager.start(deploymentName);
            progress.run();
            DeploymentStatus status = progress.getDeploymentStatus();
            if (status.isFailed())
            {
               failure = status.getFailure();
               undeploy(deploymentName);
            }
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.