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

PostResCreationPhase

public class PostResCreationPhase extends ResourcePhase
This class manages the creation of the resources from sun-resource.xml that need to created after resource adapter loading

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 PostResCreationPhase(DeploymentContext deploymentCtx)
Creates a new instance of PostResCreationPhase

param
deploymentCtx context object for the deployment

   
                        
       
    
        this.deploymentCtx = deploymentCtx;        
        this.name = POST_RES_CREATION;
    
Methods Summary
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_CREATE, 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_CREATE, new DeploymentEventInfo(req));
    
public java.util.ListgetRelevantResources(java.util.List allResources)

        return ResourcesXMLParser.getConnectorResourcesList(allResources, true);
    
public voidhandleRedeployment(java.util.List targetList, java.util.List resourceList)

        handleDeployment(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());
        }