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

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


   {
      SerializableDeploymentStatus status = new SerializableDeploymentStatus(command, StateType.RUNNING);
      status.setMessage("Running redeploy to: "+targets);
      status.setRunning(true);
      currentStatus = status;
      ProgressEvent event =  new ProgressEvent(deployment, currentStatus);
      notify(event);
      for(DeploymentTarget target : targets)
      {
         if(isCancelled)
         {
            status = new SerializableDeploymentStatus(command, StateType.CANCELLED);
            status.setMessage("Redeploy has been cancelled");
            currentStatus = status;
            event =  new ProgressEvent(deployment, currentStatus);
            notify(event);
            break;
         }

         try
         {
            target.redeploy(deployment);
            status = new SerializableDeploymentStatus(command, StateType.COMPLETED);
            status.setTarget(target);
            status.setMessage("Completed redeploy for target: "+target);
            status.setCompleted(true);
            currentStatus = status;
            event =  new ProgressEvent(deployment, currentStatus);
            notify(event);
         }
         catch(Exception e)
         {
            status = new SerializableDeploymentStatus(command, StateType.FAILED);
            status.setTarget(target);
            status.setFailure(e);
            status.setFailed(true);
            currentStatus = status;
            ProgressEvent error = new ProgressEvent(deployment, currentStatus);
            notify(error);
            break;
         }
      }
   }
View Full Code Here


   {
      SerializableDeploymentStatus status = new SerializableDeploymentStatus(command, StateType.RUNNING);
      status.setMessage("Running prepare to: "+targets);
      status.setRunning(true);
      currentStatus = status;
      ProgressEvent event =  new ProgressEvent(deployment, currentStatus);
      notify(event);
      for(DeploymentTarget target : targets)
      {
         if(isCancelled)
         {
            status = new SerializableDeploymentStatus(command, StateType.CANCELLED);
            status.setMessage("Prepare has been cancelled");
            currentStatus = status;
            event =  new ProgressEvent(deployment, currentStatus);
            notify(event);
            break;
         }

         try
         {
            target.prepare(deployment);
            status = new SerializableDeploymentStatus(command, StateType.COMPLETED);
            status.setTarget(target);
            status.setMessage("Completed prepare for target: "+target);
            status.setCompleted(true);
            currentStatus = status;
            event =  new ProgressEvent(deployment, currentStatus);
            notify(event);
         }
         catch(Exception e)
         {
            status = new SerializableDeploymentStatus(command, StateType.FAILED);
            status.setTarget(target);
            status.setFailure(e);
            status.setFailed(true);
            currentStatus = status;
            ProgressEvent error = new ProgressEvent(deployment, currentStatus);
            notify(error);
            break;
         }
      }
   }
View Full Code Here

TOP

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

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.