org.apache.geronimo.tomcat
Class TomcatWebAppContext

java.lang.Object
  extended by org.apache.geronimo.tomcat.TomcatWebAppContext
All Implemented Interfaces:
GBeanLifecycle, J2EEDeployedObject, J2EEManagedObject, J2EEModule, StatisticsProvider, WebModule, TomcatContext

public class TomcatWebAppContext
extends Object
implements GBeanLifecycle, TomcatContext, WebModule, StatisticsProvider

Wrapper for a WebApplicationContext that sets up its J2EE environment.


Field Summary
protected  TomcatContainer container
           
protected  org.apache.catalina.Context context
           
static GBeanInfo GBEAN_INFO
           
 
Constructor Summary
TomcatWebAppContext(ClassLoader classLoader, String objectName, String originalSpecDD, URL configurationBaseUrl, SecurityHolder securityHolder, String virtualServer, Map componentContext, Set unshareableResources, Set applicationManagedSecurityResources, TransactionManager transactionManager, org.apache.geronimo.connector.outbound.connectiontracking.TrackedConnectionAssociator trackedConnectionAssociator, TomcatContainer container, RunAsSource runAsSource, ObjectRetriever tomcatRealm, ValveGBean tomcatValveChain, LifecycleListenerGBean lifecycleListenerChain, CatalinaClusterGBean cluster, ManagerGBean manager, boolean crossContext, boolean disableCookies, Map webServices, Holder holder, RuntimeCustomizer contextCustomizer, J2EEServer server, J2EEApplication application, Kernel kernel)
           
 
Method Summary
 void doFail()
          Fails the GBean.
 void doStart()
          Starts the GBean.
 void doStop()
          Stops the target.
 Set getApplicationManagedSecurityResources()
           
 ClassLoader getClassLoader()
           
 org.apache.catalina.ha.CatalinaCluster getCluster()
           
 WebContainer getContainer()
           
 org.apache.catalina.Context getContext()
           
 String getContextPath()
           
 String getDeploymentDescriptor()
          The deploymentDescriptor string must contain the original XML deployment descriptor that was created for this module during the deployment process.
 String getDocBase()
           
static GBeanInfo getGBeanInfo()
           
 org.apache.InstanceManager getInstanceManager()
           
 String getJ2EEApplication()
           
 String getJ2EEServer()
           
 String[] getJavaVMs()
          A list of JVMs this module is running on.
 Context getJndiContext()
           
 Kernel getKernel()
           
 List getLifecycleListenerChain()
           
 org.apache.catalina.Manager getManager()
           
 String getObjectName()
          Gets the unique name of this object.
 org.apache.catalina.Realm getRealm()
           
 RuntimeCustomizer getRuntimeCustomizer()
           
 SecurityHolder getSecurityHolder()
           
 String getServer()
          The J2EE server the application or module is deployed on.
 String[] getServlets()
          A list of Servlets included in this WAR
 Stats getStats()
          Gets the statistics collected for this class.
 org.apache.geronimo.connector.outbound.connectiontracking.TrackedConnectionAssociator getTrackedConnectionAssociator()
           
 Set getUnshareableResources()
           
 UserTransaction getUserTransaction()
           
 List getValveChain()
           
 String getVirtualServer()
           
 URL getWARDirectory()
           
 String getWARName()
           
 Map getWebServices()
           
 boolean isCrossContext()
           
 boolean isDisableCookies()
           
 boolean isEventProvider()
          Determines if this object implemnts the event provider type defined in the J2EE Management specification.
 boolean isStateManageable()
          Determines if this object implements the state manageable type defined in the J2EE Management specification.
 boolean isStatisticsProvider()
          Determines if this object implemnts the statistics provider type defined in the J2EE Management specification.
 void resetStats()
          Reset the startTime for all statistics
 void setContext(org.apache.catalina.Context context)
           
 void setContextPath(String path)
           
 void setDocBase(String docBase)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

container

protected final TomcatContainer container

context

protected org.apache.catalina.Context context

GBEAN_INFO

public static final GBeanInfo GBEAN_INFO
Constructor Detail

TomcatWebAppContext

public TomcatWebAppContext(ClassLoader classLoader,
                           String objectName,
                           String originalSpecDD,
                           URL configurationBaseUrl,
                           SecurityHolder securityHolder,
                           String virtualServer,
                           Map componentContext,
                           Set unshareableResources,
                           Set applicationManagedSecurityResources,
                           TransactionManager transactionManager,
                           org.apache.geronimo.connector.outbound.connectiontracking.TrackedConnectionAssociator trackedConnectionAssociator,
                           TomcatContainer container,
                           RunAsSource runAsSource,
                           ObjectRetriever tomcatRealm,
                           ValveGBean tomcatValveChain,
                           LifecycleListenerGBean lifecycleListenerChain,
                           CatalinaClusterGBean cluster,
                           ManagerGBean manager,
                           boolean crossContext,
                           boolean disableCookies,
                           Map webServices,
                           Holder holder,
                           RuntimeCustomizer contextCustomizer,
                           J2EEServer server,
                           J2EEApplication application,
                           Kernel kernel)
                    throws Exception
Throws:
Exception
Method Detail

getObjectName

public String getObjectName()
Description copied from interface: J2EEManagedObject
Gets the unique name of this object. The object name must comply with the ObjectName specification in the JMX specification and the restrictions in the J2EEManagementInterface.

Specified by:
getObjectName in interface J2EEManagedObject
Returns:
the unique name of this object within the server

getJ2EEApplication

public String getJ2EEApplication()

getJ2EEServer

public String getJ2EEServer()

isStateManageable

public boolean isStateManageable()
Description copied from interface: J2EEManagedObject
Determines if this object implements the state manageable type defined in the J2EE Management specification.

Specified by:
isStateManageable in interface J2EEManagedObject
Returns:
true if this class also implements the state manageable type; false otherwise

isStatisticsProvider

public boolean isStatisticsProvider()
Description copied from interface: J2EEManagedObject
Determines if this object implemnts the statistics provider type defined in the J2EE Management specification.

Specified by:
isStatisticsProvider in interface J2EEManagedObject
Returns:
true if this class also implements the statistics provider type; false otherwise

isEventProvider

public boolean isEventProvider()
Description copied from interface: J2EEManagedObject
Determines if this object implemnts the event provider type defined in the J2EE Management specification.

Specified by:
isEventProvider in interface J2EEManagedObject
Returns:
true if this class also implements the event manageable type; false otherwise

getWARDirectory

public URL getWARDirectory()

getWARName

public String getWARName()

getContainer

public WebContainer getContainer()

getServer

public String getServer()
Description copied from interface: J2EEDeployedObject
The J2EE server the application or module is deployed on.

Specified by:
getServer in interface J2EEDeployedObject
Returns:
the server this module is deployed on
See Also:
"JSR77.3.5.0.2"

getDocBase

public String getDocBase()
Specified by:
getDocBase in interface TomcatContext

setDocBase

public void setDocBase(String docBase)

getUserTransaction

public UserTransaction getUserTransaction()
Specified by:
getUserTransaction in interface TomcatContext

getJndiContext

public Context getJndiContext()
Specified by:
getJndiContext in interface TomcatContext

getVirtualServer

public String getVirtualServer()
Specified by:
getVirtualServer in interface TomcatContext

getClassLoader

public ClassLoader getClassLoader()
Specified by:
getClassLoader in interface TomcatContext

getKernel

public Kernel getKernel()
Specified by:
getKernel in interface TomcatContext

isDisableCookies

public boolean isDisableCookies()
Specified by:
isDisableCookies in interface TomcatContext

getContext

public org.apache.catalina.Context getContext()
Specified by:
getContext in interface TomcatContext

setContext

public void setContext(org.apache.catalina.Context context)
Specified by:
setContext in interface TomcatContext

getContextPath

public String getContextPath()
Specified by:
getContextPath in interface TomcatContext

setContextPath

public void setContextPath(String path)

getSecurityHolder

public SecurityHolder getSecurityHolder()
Specified by:
getSecurityHolder in interface TomcatContext

getApplicationManagedSecurityResources

public Set getApplicationManagedSecurityResources()
Specified by:
getApplicationManagedSecurityResources in interface TomcatContext

getTrackedConnectionAssociator

public org.apache.geronimo.connector.outbound.connectiontracking.TrackedConnectionAssociator getTrackedConnectionAssociator()
Specified by:
getTrackedConnectionAssociator in interface TomcatContext

getUnshareableResources

public Set getUnshareableResources()
Specified by:
getUnshareableResources in interface TomcatContext

getRealm

public org.apache.catalina.Realm getRealm()
Specified by:
getRealm in interface TomcatContext

getValveChain

public List getValveChain()
Specified by:
getValveChain in interface TomcatContext

getLifecycleListenerChain

public List getLifecycleListenerChain()
Specified by:
getLifecycleListenerChain in interface TomcatContext

getCluster

public org.apache.catalina.ha.CatalinaCluster getCluster()
Specified by:
getCluster in interface TomcatContext

getManager

public org.apache.catalina.Manager getManager()
Specified by:
getManager in interface TomcatContext

isCrossContext

public boolean isCrossContext()
Specified by:
isCrossContext in interface TomcatContext

getWebServices

public Map getWebServices()
Specified by:
getWebServices in interface TomcatContext

getInstanceManager

public org.apache.InstanceManager getInstanceManager()
Specified by:
getInstanceManager in interface TomcatContext

getRuntimeCustomizer

public RuntimeCustomizer getRuntimeCustomizer()

getServlets

public String[] getServlets()
Description copied from interface: WebModule
A list of Servlets included in this WAR

Specified by:
getServlets in interface WebModule
Returns:
the ObjectNames of the Servlets in this WAR
See Also:
"JSR77.3.16.1.1"

getJavaVMs

public String[] getJavaVMs()
Description copied from interface: J2EEModule
A list of JVMs this module is running on. Each JVM listed here must be present in the owning J2EEServer's list of JVMs.

Specified by:
getJavaVMs in interface J2EEModule
Returns:
the ObjectNames of the JVMs the module is running on
See Also:
"JSR77.3.7.1.1"

getDeploymentDescriptor

public String getDeploymentDescriptor()
Description copied from interface: J2EEDeployedObject
The deploymentDescriptor string must contain the original XML deployment descriptor that was created for this module during the deployment process.

Specified by:
getDeploymentDescriptor in interface J2EEDeployedObject
Returns:
this module's deployment descriptor
See Also:
"JSR77.3.5.0.1"

getStats

public Stats getStats()
Description copied from interface: StatisticsProvider
Gets the statistics collected for this class. The first call to this method initializes the startTime for all statistics.

Specified by:
getStats in interface StatisticsProvider
Returns:
gets collected for this class

resetStats

public void resetStats()
Description copied from interface: StatisticsProvider
Reset the startTime for all statistics

Specified by:
resetStats in interface StatisticsProvider

doStart

public void doStart()
             throws Exception
Description copied from interface: GBeanLifecycle
Starts the GBean. This informs the GBean that it is about to transition to the running state.

Specified by:
doStart in interface GBeanLifecycle
Throws:
Exception - if the target failed to start; this will cause a transition to the failed state

doStop

public void doStop()
            throws Exception
Description copied from interface: GBeanLifecycle
Stops the target. This informs the GBean that it is about to transition to the stopped state.

Specified by:
doStop in interface GBeanLifecycle
Throws:
Exception - if the target failed to stop; this will cause a transition to the failed state

doFail

public void doFail()
Description copied from interface: GBeanLifecycle
Fails the GBean. This informs the GBean that it is about to transition to the failed state.

Specified by:
doFail in interface GBeanLifecycle

getGBeanInfo

public static GBeanInfo getGBeanInfo()


Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.