The com.sun.appserv.server.LifecycleEventContext interface exposes runtime information about the server. The lifecycle event context is created when the LifecycleEvent class is instantiated at server initialization. The LifecycleEventContext interface defines these methods:
public java.lang.String[] getCmdLineArgs()
This method returns the server startup command-line arguments.
public java.lang.String getInstallRoot()
This method returns the server installation root directory.
public java.lang.String getInstanceName()
This method returns the server instance name.
public javax.naming.InitialContext getInitialContext()
This method returns the initial JNDI naming context. The naming environment for lifecycle modules is installed after the STARTUP_EVENT. A lifecycle module can look up any resource by its jndi-name attribute after the READY_EVENT.
If a lifecycle module needs to look up resources, it can do so after the READY_EVENT. It can use the getInitialContext() method to get the initial context to which all the resources are bound.