Fields Summary |
---|
public static final String | J2EECnames used for phases |
public static final String | ASSOCIATE |
public static final String | DISASSOCIATE |
public static final String | APP_START |
public static final String | RA_START |
public static final String | APP_STOP |
public static final String | RA_STOP |
public static final String | UNDEPLOY |
public static final String | PRE_RES_CREATION |
public static final String | POST_RES_CREATION |
public static final String | PRE_RES_DELETION |
public static final String | POST_RES_DELETION |
protected DeploymentContext | deploymentCtxcontext object for executing this phase |
private static com.sun.enterprise.util.i18n.StringManager | localStringsstring manager |
String | namename of the phase |
Methods Summary |
---|
public final DeploymentPhaseContext | executePhase(com.sun.enterprise.deployment.backend.DeploymentRequest req, com.sun.enterprise.deployment.backend.DeploymentStatus status)This method executes the whole phase.
DeploymentPhaseContext phaseCtx = getPhaseContext();
phaseCtx.setDeploymentRequest(req);
phaseCtx.setDeploymentStatus(status);
prePhase(phaseCtx);
if (status.getStatus()>DeploymentStatus.FAILURE)
runPhase(phaseCtx);
if (status.getStatus()>DeploymentStatus.FAILURE)
postPhase(phaseCtx);
return phaseCtx;
|
public java.lang.String | getName()Gets the name of this phase
return name;
|
protected DeploymentPhaseContext | getPhaseContext()
return new StandardDeploymentPhaseContext();
|
protected DeploymentTarget | getTarget(java.lang.String targetName)Returns the deployment target of the specified name
try{
DeploymentTarget target = getTargetFactory().getTarget(
deploymentCtx.getConfigContext(), targetName);
return target;
}catch(IASDeploymentException de){
String msg = localStrings.getString("enterprise.deployment.phasing.phase.targetnotfound");
throw new DeploymentPhaseException(getName(), msg, de);
}
|
private DeploymentTargetFactory | getTargetFactory()
return DeploymentTargetFactory.getDeploymentTargetFactory();
|
public void | postPhase(DeploymentPhaseContext phaseCtx)Any postPhase checks and postPhase cleanup can happen here
//phase specific post conditions must be checked here
|
public void | postPhaseNotify(com.sun.enterprise.deployment.backend.DeploymentEvent event)All listeners registered with DeploymentEventManager will be notified
at the end of the phase
DeploymentEventManager.notifyDeploymentEvent(event);
|
public void | prePhase(DeploymentPhaseContext phaseCtx)Any prePhase checks can be done here, and also any preparation for actual
phase execution can happen here
//phase specific pre conditions must be checked here
|
public void | prePhaseNotify(com.sun.enterprise.deployment.backend.DeploymentEvent event)All the listeners registered for this phase will be notified
at the start of the phase.
DeploymentEventManager.notifyDeploymentEvent(event);
|
public void | rollback(DeploymentPhaseContext phaseCtx)This method is called when a successfully executed phase needs
to be rollbacked due to a subsequent failure in the deployment
process. All information needed for rollbacking should be
available in the DeploymentPhaseContext instance returned by
the executePhase and passed to this method
|
public abstract void | runPhase(DeploymentPhaseContext phaseCtx)Phase specific execution logic will go in this method. Any phase implementing
this class will provide its implementation for this method.
|
void | setName(java.lang.String name)Sets the name of this phase
this.name = name;
|