Examples of DeploymentProgressImpl


Examples of com.sun.appserv.management.deploy.DeploymentProgressImpl

        try {
            DeploymentCallback callback = req.getDeploymentCallback();
            if (callback != null) {
                int percent = 0;
                DeploymentProgress progress = new DeploymentProgressImpl(
                    (byte)percent, "deployment started", null);
                callback.deploymentProgress(progress);
            }
       
            // set the current deployment status in deployment request
            // to J2EECPhase deployment status
            req.setCurrentDeploymentStatus(status);

            req.setDescriptor(deploymentCtx.getApplication(req.getName()));

            if (DeploymentServiceUtils.isRegistered(req.getName(),
                req.getType()) && req.isForced()) {

                isRedeploy = true;

                //Re-record instrospect/instrument/verifier data if
                //any of the application is re-deployed
                if (AppVerification.doInstrument()) {
                    AppVerification.getInstrumentLogger().handleChangeInDeployment();
                }
            }

            if(req.isApplication())
                isApp = true;
           
            if (!req.isExtensionModule()) {
                deployer = DeployerFactory.getDeployer(req);
                deployer.doRequestPrepare();
            }

            if(isRedeploy) {
                // clear the deploymentCtx cache now
                deploymentCtx.removeApplication(req.getName());              
                req.setDescriptor(null);

                target = (DeploymentTarget)req.getTarget();
               
                // In the case of redeploy to domain,
                // no stop event will be sent.
                if(target != null && ! target.getName().equals("domain")) {
                    targetName = target.getName();
               
                    if(isApp) {
                        type = null;
                        actionCode  = BaseDeployEvent.APPLICATION_UNDEPLOYED;
                    }
                    else {
                        type = DeploymentServiceUtils.getModuleTypeString(req.getType());
                        actionCode  = BaseDeployEvent.MODULE_UNDEPLOYED;
                    }
                    DeploymentServiceUtils.multicastEvent(actionCode, req.getName(), type, req.getCascade(), req.isForced(),  targetName);
                    wasUnRegistered = true;
                }
            }
           
            if (req.isExtensionModule()) {
                ModuleType moduleType = req.getType().getModuleType();
                extDeployer =
                    PluggableDeploymentInfo.getExtensionModuleDeployer(
                        moduleType);  
                if (isRedeploy) {
                    extDeployer.redeployToDomain(req);
                } else {
                    extDeployer.deployToDomain(req);
                }
            } else {
                deployer.doRequestFinish();
                // cache the updated application object in deployment context
                deploymentCtx.addApplication(req.getName(), req.getDescriptor());
                parseAndValidateSunResourcesXMLFiles(req);
                deployer.cleanup();
            }
           
            // check if an abort operation has been issued
            // throw exception if true
            DeploymentServiceUtils.checkAbort(req.getName());

            // do all the config update at the end for easy rollback
            if(isRedeploy) {
                DeploymentServiceUtils.updateConfig(req);
            } else {
                DeploymentServiceUtils.addToConfig(req);
            }
            // set context roots on config bean
            ApplicationConfigHelper.resetAppContextRoots(
                DeploymentServiceUtils.getConfigContext(), req.getName(),
                true);

            wasUnRegistered = false// addToConfig re-registered it...

            // everything went fine
            status.setStageStatus(DeploymentStatus.SUCCESS);           
           
            // some useful information for clients...
            sLogger.log(Level.INFO, "deployed with " + DeploymentProperties.MODULE_ID + " = " + req.getName());
            populateStatusProperties(status, req);
            if (callback != null) {
                int percent = 100;
                DeploymentProgress progress2 = new DeploymentProgressImpl(
                    (byte)percent, "deployment finished", null);
                callback.deploymentProgress(progress2);
            }
        
        } catch(Throwable t) {
View Full Code Here

Examples of com.sun.appserv.management.deploy.DeploymentProgressImpl

    public DeploymentProgressImpl
  createDeploymentProgress()
  {
    final Object  id  = "deploy:999";
   
    final DeploymentProgressImpl  dp  =
      new DeploymentProgressImpl( (byte)99, "description", null );
   
    return( dp );
  }
View Full Code Here

Examples of com.sun.appserv.management.deploy.DeploymentProgressImpl

 
 
    public void
  testDeploymentProgressAsMap()
  {
    final DeploymentProgressImpl  dp  = createDeploymentProgress();
   
    final Map<String,Serializable>  data  = dp.asMap();
  }
View Full Code Here

Examples of com.sun.appserv.management.deploy.DeploymentProgressImpl

  }
 
    public void
  testDeploymentProgressFromMap()
  {
    final DeploymentProgressImpl  dp  = createDeploymentProgress();
   
    final Map<String,Serializable>  data = dp.asMap();
   
    final DeploymentProgressImpl dp2  = new DeploymentProgressImpl( data );
   
    assert( dp2.equals( dp ) );
  }
View Full Code Here

Examples of com.sun.appserv.management.deploy.DeploymentProgressImpl

    while ( percent < 100 )
    {
      percent  += 10;
     
      final DeploymentProgress  progress  =
        new DeploymentProgressImpl(
          (byte)percent, "percent done", null);
       
      callback.deploymentProgress( progress );
      Thread.sleep( 1 );
    }
View Full Code Here

Examples of com.sun.appserv.management.deploy.DeploymentProgressImpl

  getDeploymentProgress()
  {
    final byte    progressPercent      = 0;
    final String  description        = "<no description>";
   
    final DeploymentProgressImpl  progress  =
      new DeploymentProgressImpl( progressPercent, description, null);
   
    return( progress );
  }
View Full Code Here

Examples of org.jboss.profileservice.management.client.upload.DeploymentProgressImpl

      List<DeploymentTarget> targets = getDeploymentTargets();
      SerializableDeploymentID deployment = new SerializableDeploymentID(name, getTargetProfile(), contentURL.toString());
      deployment.setContentURL(contentURL);
      deployment.setCopyContent(copyContent);
      return new DeploymentProgressImpl(targets, deployment, CommandType.DISTRIBUTE);
   }
View Full Code Here

Examples of org.jboss.profileservice.management.client.upload.DeploymentProgressImpl

      List<DeploymentTarget> targets = getDeploymentTargets();
      SerializableDeploymentID deployment = new SerializableDeploymentID(name, getTargetProfile(), contentURL.toString());
      deployment.setContentURL(contentURL);
      for(DeploymentOption option : options)
         deployment.addDeploymentOption(option);
      return new DeploymentProgressImpl(targets, deployment, CommandType.DISTRIBUTE);
   }
View Full Code Here

Examples of org.jboss.profileservice.management.client.upload.DeploymentProgressImpl

         throw new IllegalStateException(msg);
      }

      List<DeploymentTarget> targets = getDeploymentTargets();
      SerializableDeploymentID deployment = new SerializableDeploymentID(name, getTargetProfile(), null);
      return new DeploymentProgressImpl(targets, deployment, CommandType.REDEPLOY);
   }
View Full Code Here

Examples of org.jboss.profileservice.management.client.upload.DeploymentProgressImpl

      if (names == null || names.length == 0)
         log.warn("Null or empty names.");

      List<DeploymentTarget> targets = getDeploymentTargets();
      SerializableDeploymentID deployment = new SerializableDeploymentID(names, getTargetProfile(), null);
      return new DeploymentProgressImpl(targets, deployment, type);
   }
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.