FileDocCategorySizeDatePackage
ServerLifecycle.javaAPI DocGlassfish v2 API4899Fri May 04 22:32:54 BST 2007com.sun.appserv.server

ServerLifecycle

public interface ServerLifecycle
ServerLifecycle interface: common lifecycle interface for application server and its subsystems. This interface is implemented by the ApplicationServer and its subsystems such as the web container or EJB container, in order to provide a consistent mechanism for server initialization-startup-shutdown-termination lifecycle.

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

public voidonReady(com.sun.enterprise.server.ServerContext sc)
Server has complted loading the applications and is ready to serve requests.

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

public voidonShutdown()
Server is shutting down applications

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

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

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