Package com.sun.appserv.management.deploy

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


   
    final Object  deployID  = mgr.initDeploy( );
    assert( deployID instanceof String );
    final MyNotificationListener myListener  = new MyNotificationListener( deployID);
   
    DeploymentStatus  status  = null;
    mgr.addNotificationListener( myListener, null, null );
    try
    {
      final Map<String,String> options  = new HashMap<String,String>();
      options.put( DeploymentMgr.DEPLOY_OPTION_FORCE_KEY, Boolean.TRUE.toString() );
View Full Code Here


      removeAllRefs( moduleID );
     
    final DeploymentMgr  mgr  = getDeploymentMgr();
   
    final long  start  = now();
    final DeploymentStatus  status  = DeploymentSupport.mapToDeploymentStatus( mgr.undeploy( moduleID, null ) );
    assert( status.getStageStatus() == DeploymentStatus.STATUS_CODE_SUCCESS );
   
    printElapsed( "undeploy " + moduleID, start );
  }
View Full Code Here

        try
        {
          if ( theFile.exists() )
          {
            final long  start  = now();
            final DeploymentStatus  status  = deploy( theFile );
            final long elapsed = now() - start;
           
            String msg  = "Deployed: " +
                quote( theFile ) + " in " +  elapsed + "ms";
            if ( getVerbose() )
            {
                msg = msg + ", DeploymentStatus = " + status;
            }
            println( msg );
               
            if ( status.getStageStatus() != DeploymentStatus.STATUS_CODE_SUCCESS )
            {
              warning( "DeploymentMgrTest.testDeployUndeployModules: expected STATUS_CODE_SUCCESS " +
              "for " + quote( theFile.toString() ) +
              ", got " + status.getStageStatus() );
              failedSet.add( theFile.toString() );
              continue;
            }
           
            String  moduleID  =
              (String)status.getAdditionalStatus().get( DeploymentStatus.MODULE_ID_KEY );
             
              if ( moduleID == null )
              {
                  moduleID  =(String) status.getAdditionalStatus().get( "moduleid" );
                  assert( moduleID != null );
             
                warning( "WARNING: used 'moduleid' instead of " +
                  "DeploymentStatus.MODULE_ID_KEY (" + DeploymentStatus.MODULE_ID_KEY +
                  ") as workaround for bug #6218705" );
View Full Code Here

          if ( type.equals( DeploymentMgr.DEPLOYMENT_COMPLETED_NOTIFICATION_TYPE ) )
          {
            final Map<String,Serializable>  statusData  = TypeCast.asMap(
              m.get( DeploymentMgr.NOTIF_DEPLOYMENT_COMPLETED_STATUS_KEY ) );
           
            final DeploymentStatus  status  =
              DeploymentSupport.mapToDeploymentStatus( statusData );
           
            assert( mDeployID.equals( deployID ) )  :
              "deploy ID mismatch: " + mDeployID + " != " + deployID;
           
View Full Code Here

  undeploy(
    final String  moduleID,
    final Map<String,String>    optionalParams)
  {
    final Undeployer    undeployer  = new Undeployer( moduleID, optionalParams );
    final DeploymentStatus  undeploymentStatus  = undeployer.undeploy();
   
    return( undeploymentStatus.asMap() );
  }
View Full Code Here

   * to translate the codes.
   */
    private void
  checkDeploymentStatusForExceptions( Map<String,Serializable > m )
    {
    DeploymentStatus status = DeploymentSupport.mapToDeploymentStatus( m );
   
    Throwable t = status.getStageThrowable();
   
    final Iterator<DeploymentStatus> it = status.getSubStagesList().iterator();
    while ( ( t == null ) && ( it.hasNext() ) )
    {
      final DeploymentStatus m1 = it.next();
      t = status.getThrowable();
    }
    if ( null != t )
    {
      throw new RuntimeException( status.getStageStatusMessage() );
View Full Code Here

      while ( ! mListener.isCompleted() )
      {
          Util.sleep( pollMillis );
      }
     
      final DeploymentStatus  status  = mListener.getDeploymentStatus();
     
      return status;
  }
View Full Code Here

      if ( mListener == null || ! mListener.isCompleted() )
      {
          throw new IllegalStateException();
      }
     
      final DeploymentStatus  status  = mListener.getDeploymentStatus();
     
      if ( status == null || status.getStageStatus() == STATUS_CODE_FAILURE )
      {
          throw new IllegalStateException();
      }
     
      if ( mDidAssociate )
      {
          throw new IllegalStateException();
      }
     
      // OK, go ahead
    final Map<String,Serializable>    additionalStatus = status.getAdditionalStatus();
    final String moduleID  = (String)additionalStatus.get( MODULE_ID_KEY );
 
      final Set<DeployedItemRefConfig>   refs = new HashSet<DeployedItemRefConfig>();
      final Set<DeployedItemRefConfigCR>  proxies = getTargetProxies( getDomainRoot(), targets );
      for( final DeployedItemRefConfigCR cr : proxies )
View Full Code Here

      final Map<String,String>  refOptions )
      throws IOException
  {
      deploy( archive, deployOptions );
     
      final DeploymentStatus  status  = waitTillDone( 50 );
     
      if ( targets != null && targets.length != 0 )
      {
          createReferences( targets, refOptions );
      }
View Full Code Here

      while ( ! mListener.isCompleted() )
      {
          Util.sleep( pollMillis );
      }
     
      final DeploymentStatus  status  = mListener.getDeploymentStatus();
     
      return status;
  }
View Full Code Here

TOP

Related Classes of com.sun.appserv.management.deploy.DeploymentStatus

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.