FileDocCategorySizeDatePackage
Undeployer.javaAPI DocGlassfish v2 API4021Fri May 04 22:23:28 BST 2007com.sun.enterprise.management.deploy

Undeployer

public final class Undeployer extends Object

Fields Summary
private final String
mModuleID
private Map
mParams
Constructors Summary
public Undeployer(String moduleID, Map params)

        mModuleID = moduleID;
        mParams = params;
    
Methods Summary
public com.sun.appserv.management.deploy.DeploymentStatusundeploy()

        try
        {
            com.sun.enterprise.deployment.backend.DeploymentStatus ds =
                DeploymentService.getDeploymentService().undeploy(mModuleID, mParams);
                
            ds.setStageStatus(ds.getStatus()); // This is done for the AMX clients to get complete status

            DeploymentRequestRegistry.getRegistry().removeDeploymentRequest( mModuleID);

            final Map<String,Serializable>  m =
                TypeCast.checkMap( ds.asMap(), String.class, Serializable.class );
                
            return new DeploymentStatusImpl( m );
        }
        
        catch(Exception e)
        {
            com.sun.enterprise.deployment.backend.DeploymentStatus ds =
                new com.sun.enterprise.deployment.backend.DeploymentStatus();
            ds.setStageException(e);
            ds.setStageStatus(com.sun.enterprise.deployment.backend.DeploymentStatus.FAILURE);
            ds.setStageStatusMessage(e.getMessage());
            ds.setStageDescription("UnDeployment");
            DeploymentRequestRegistry.getRegistry().removeDeploymentRequest(
                mModuleID);
                
            final Map<String,Serializable>  m =
                TypeCast.checkMap( ds.asMap(), String.class, Serializable.class );
                
            return new DeploymentStatusImpl( m );
        }