FileDocCategorySizeDatePackage
PostResDeletionPhase.javaAPI DocGlassfish v2 API6480Fri May 04 22:34:38 BST 2007com.sun.enterprise.deployment.phasing

PostResDeletionPhase

public class PostResDeletionPhase extends ResourcePhase
This class manages the deletion of the resources from sun-resources.xml that need to deleted prior to resource adapter unloading

Fields Summary
public static final Logger
sLogger
Deployment Logger object for this class
private static com.sun.enterprise.util.i18n.StringManager
localStrings
string manager
Constructors Summary
public PostResDeletionPhase(DeploymentContext deploymentCtx)
Creates a new instance of PostResDeletionPhase

param
deploymentCtx context object for the deployment

   
                        
       
    
        this.deploymentCtx = deploymentCtx;        
        this.name = POST_RES_DELETION;
    
Methods Summary
public java.lang.StringgetActualAction(java.lang.String resAction)

        if (resAction.equals(DeploymentProperties.RES_DEPLOYMENT)) {
            return DeploymentProperties.RES_NO_OP;
        } else {
            return resAction;
        }
    
private com.sun.enterprise.deployment.backend.DeploymentEventgetPostPhaseEvent(com.sun.enterprise.deployment.backend.DeploymentRequest req)
Event that will be broadcasted at the end of the phase

return
DeploymentEvent

        return new DeploymentEvent(DeploymentEventType.POST_RES_DELETE, new DeploymentEventInfo(req));
    
private com.sun.enterprise.deployment.backend.DeploymentEventgetPrePhaseEvent(com.sun.enterprise.deployment.backend.DeploymentRequest req)
Event that will be broadcasted at the start of the phase

param
req Deployment request object
return
DeploymentEvent

        return new DeploymentEvent(DeploymentEventType.PRE_RES_DELETE, new DeploymentEventInfo(req));
    
public java.util.ListgetRelevantResources(java.util.List allResources)

        return ResourcesXMLParser.getNonConnectorResourcesList(allResources, false);
    
public voidhandleDeployment(java.util.List targetList, java.util.List resourceList)

    
public voidhandleRedeployment(java.util.List targetList, java.util.List resourceList)

        handleUndeployment(targetList, resourceList);
    
public voidrunPhase(DeploymentPhaseContext phaseCtx)
Phase specific execution logic will go in this method. Any phase implementing this class will provide its implementation for this method.

param
req Deployment request object
param
phaseCtx the DeploymentPhaseContext object

        DeploymentStatus status = phaseCtx.getDeploymentStatus();

        try {
            DeploymentRequest req = phaseCtx.getDeploymentRequest();
                                                                      
            prePhaseNotify(getPrePhaseEvent(req));
            doResourceOperation(req);
            postPhaseNotify(getPostPhaseEvent(req));
                                                                      
            phaseCtx.getDeploymentStatus().setStageStatus(DeploymentStatus.SUCCESS);
        } catch(Exception e) {
            status.setStageStatus(DeploymentStatus.WARNING);
            status.setStageException(e);
            status.setStageStatusMessage(e.getMessage());
        }