FileDocCategorySizeDatePackage
PEWebContainerLifecycle.javaAPI DocGlassfish v2 API4665Fri May 04 22:36:02 BST 2007com.sun.enterprise.web

PEWebContainerLifecycle

public final class PEWebContainerLifecycle extends WebContainerLifecycle
This class implements the lifecycle methods used by the web container subsystem for PE/RI.

Fields Summary
Constructors Summary
Methods Summary
public voidonInitialization(com.sun.enterprise.server.ServerContext sc)
Server is initializing subsystems and setting up the runtime environment. Prepare for the beginning of active use of the public methods of this subsystem. This method is called before any of the public methods of this subsystem are utilized.

param
sc ServerContext the server runtime context.
exception
IllegalStateException if this subsystem has already been started
exception
ServerLifecycleException if this subsystem detects a fatal error that prevents this subsystem from being used

    
	super.onInitialization(sc);
	//create an instance of the PE Web Container (Tomcat)
	PEWebContainer.createInstance(sc);
    
public voidonShutdown()
Server is shutting down applications

exception
ServerLifecycleException if this subsystem detects a fatal error that prevents this subsystem from being used

        if (PEWebContainer.getPEWebContainer() != null) {
	    PEWebContainer.getPEWebContainer().stopInstance();
	} //else do nothing since PEWebContainer is not initialised
    
public voidonStartup(com.sun.enterprise.server.ServerContext sc)
Server is starting up applications

param
sc ServerContext the server runtime context.
exception
ServerLifecycleException if this subsystem detects a fatal error that prevents this subsystem from being used

	PEWebContainer.getPEWebContainer().startInstance();
    
public voidonTermination()
Server is terminating the subsystems and the runtime environment. Gracefully terminate the active use of the public methods of this subsystem. This method should be the last one called on a given instance of this subsystem.

exception
ServerLifecycleException if this subsystem detects a fatal error that prevents this subsystem from being used