org.apache.geronimo.jetty
Class JettyWebAppContext

java.lang.Object
  extended byorg.mortbay.util.Container
      extended byorg.mortbay.http.HttpContext
          extended byorg.mortbay.jetty.servlet.ServletHttpContext
              extended byorg.mortbay.jetty.servlet.WebApplicationContext
                  extended byorg.apache.geronimo.jetty.JettyWebAppContext
All Implemented Interfaces:
org.mortbay.util.EventProvider, Externalizable, org.apache.geronimo.gbean.GBeanLifecycle, org.mortbay.http.HttpHandler, org.apache.geronimo.management.J2EEDeployedObject, org.apache.geronimo.management.J2EEManagedObject, org.apache.geronimo.management.J2EEModule, JettyServletRegistration, org.mortbay.util.LifeCycle, Serializable, org.apache.geronimo.management.geronimo.WebModule, org.apache.geronimo.management.WebModule

public class JettyWebAppContext
extends org.mortbay.jetty.servlet.WebApplicationContext
implements org.apache.geronimo.gbean.GBeanLifecycle, JettyServletRegistration, org.apache.geronimo.management.geronimo.WebModule

Wrapper for a WebApplicationContext that sets up its J2EE environment.

Version:
$Rev: 413196 $ $Date: 2006-06-10 02:19:44 +0200 (Sat, 10 Jun 2006) $
See Also:
Serialized Form

Nested Class Summary
static class JettyWebAppContext.SessionManagerConfiguration
           
 
Nested classes inherited from class org.mortbay.jetty.servlet.WebApplicationContext
org.mortbay.jetty.servlet.WebApplicationContext.Configuration
 
Field Summary
static org.apache.geronimo.gbean.GBeanInfo GBEAN_INFO
           
 
Fields inherited from class org.mortbay.http.HttpContext
__ErrorHandler, __fileClassPathAttr
 
Constructor Summary
JettyWebAppContext()
          Deprecated. never use this... this is only here because Jetty WebApplicationContext is externalizable
JettyWebAppContext(String objectName, String originalSpecDD, String sessionManager, Map componentContext, org.apache.geronimo.transaction.context.OnlineUserTransaction userTransaction, ClassLoader classLoader, URL configurationBaseUrl, Set unshareableResources, Set applicationManagedSecurityResources, String displayName, Map contextParamMap, Collection listenerClassNames, boolean distributable, Map mimeMap, String[] welcomeFiles, Map localeEncodingMapping, Map errorPages, org.mortbay.http.Authenticator authenticator, String realmName, Map tagLibMap, int sessionTimeoutSeconds, String policyContextID, String securityRealmName, org.apache.geronimo.security.deploy.DefaultPrincipal defaultPrincipal, PermissionCollection checkedPermissions, PermissionCollection excludedPermissions, Host host, org.apache.geronimo.transaction.context.TransactionContextManager transactionContextManager, org.apache.geronimo.transaction.TrackedConnectionAssociator trackedConnectionAssociator, JettyContainer jettyContainer, org.apache.geronimo.security.jacc.RoleDesignateSource roleDesignateSource, org.apache.geronimo.management.J2EEServer server, org.apache.geronimo.management.J2EEApplication application, org.apache.geronimo.kernel.Kernel kernel)
           
 
Method Summary
 boolean checkSecurityConstraints(String pathInContext, org.mortbay.http.HttpRequest request, org.mortbay.http.HttpResponse response)
           
 void doFail()
           
 void doStart()
           
 void doStop()
           
 Object enterContextScope(org.mortbay.http.HttpRequest httpRequest, org.mortbay.http.HttpResponse httpResponse)
           
 String getApplication()
           
 org.apache.geronimo.management.geronimo.WebContainer getContainer()
           
 String getDeploymentDescriptor()
           
 String getDisplayName()
           
static org.apache.geronimo.gbean.GBeanInfo getGBeanInfo()
           
 String[] getJavaVMs()
           
 String getObjectName()
           
 String getServer()
           
 String[] getServlets()
           
 String getSessionManager()
           
 URL getURLFor()
           
 URL getWARDirectory()
           
 String getWARName()
           
 ClassLoader getWebClassLoader()
           
 boolean isEventProvider()
           
 boolean isStateManageable()
           
 boolean isStatisticsProvider()
           
 void leaveContextScope(org.mortbay.http.HttpRequest httpRequest, org.mortbay.http.HttpResponse httpResponse, Object oldScope)
           
 void registerServletHolder(org.mortbay.jetty.servlet.ServletHolder servletHolder, String servletName, Set servletMappings, String objectName)
           
 void setContextParamMap(Map initParameters)
           
 void setDisplayName(String displayName)
           
 void setErrorPages(Map errorPageMap)
           
 void setListenerClassNames(Collection eventListeners)
           
 void setLocaleEncodingMapping(Map localeEncodingMap)
           
 void setSessionTimeoutSeconds(int seconds)
           
 void setTagLibMap(Map tagLibMap)
           
 
Methods inherited from class org.mortbay.jetty.servlet.WebApplicationContext
addEventListener, configureClassPath, configureDefaults, configureWebApp, destroy, getConfigurationClassNames, getConfigurations, getDefaultsDescriptor, getErrorPage, getExtractWAR, getResource, getResourceAlias, getResourceAliases, getServletHandler, getUserRealm, getWAR, getWebApplicationHandler, getWebInf, handle, initialize, isDistributable, isIgnoreWebJetty, loadConfigurations, readExternal, removeErrorPage, removeEventListener, removeResourceAlias, setConfigurationClassNames, setDefaultsDescriptor, setDistributable, setErrorPage, setExtractWAR, setIgnoreWebJetty, setPermissions, setResourceAlias, setWAR, toString, writeExternal
 
Methods inherited from class org.mortbay.jetty.servlet.ServletHttpContext
addLocaleEncoding, addServlet, addServlet, getLocaleEncoding, getServletContext, jSecurityCheck, sendError
 
Methods inherited from class org.mortbay.http.HttpContext
addClassPath, addClassPaths, addHandler, addHandler, addPermission, addSecurityConstraint, addVirtualHost, addWelcomeFile, canonicalContextPathSpec, clearSecurityConstraints, flushCache, getAttribute, getAttributeNames, getAttributes, getAuthenticator, getBaseResource, getClassLoader, getClassPath, getContextPath, getEncodingByMimeType, getEncodingMap, getFileClassPath, getHandler, getHandlerIndex, getHandlers, getHosts, getHttpConnection, getHttpContext, getHttpContextName, getHttpServer, getInitParameter, getInitParameterNames, getMaxCachedFileSize, getMaxCacheSize, getMimeByExtension, getMimeMap, getName, getParentClassLoader, getPermissions, getRealm, getRealmName, getRequestLog, getRequests, getRequestsActive, getRequestsActiveMax, getResourceBase, getResourceMetaData, getResponses1xx, getResponses2xx, getResponses3xx, getResponses4xx, getResponses5xx, getServerClasses, getStatsOn, getStatsOnMs, getStopGracefully, getSystemClasses, getTempDirectory, getVirtualHosts, getWelcomeFile, getWelcomeFiles, handle, initClassLoader, initialize, isClassLoaderJava2Compliant, isRedirectNullPath, loadClass, log, removeAttribute, removeHandler, removeHandler, removeVirtualHost, removeWelcomeFile, sendContextError, setAttribute, setAttributes, setAuthenticator, setBaseResource, setClassLoader, setClassLoaderJava2Compliant, setClassPath, setContextPath, setEncodingMap, setHandlers, setHosts, setHttpContextName, setInitParameter, setMaxCachedFileSize, setMaxCacheSize, setMimeMap, setMimeMapping, setParentClassLoader, setRealm, setRealmName, setRedirectNullPath, setRequestLog, setResourceBase, setServerClasses, setStatsOn, setStopGracefully, setSystemClasses, setTempDirectory, setTypeEncoding, setVirtualHosts, setWelcomeFiles, startHandlers, statsReset, stop, toString
 
Methods inherited from class org.mortbay.util.Container
addComponent, getComponents, isStarted, isStarting, isStopping, removeComponent, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.geronimo.jetty.JettyServletRegistration
getServletHandler
 
Methods inherited from interface org.apache.geronimo.management.geronimo.WebModule
getContextPath
 
Methods inherited from interface org.mortbay.util.LifeCycle
isStarted, start, stop
 

Field Detail

GBEAN_INFO

public static final org.apache.geronimo.gbean.GBeanInfo GBEAN_INFO
Constructor Detail

JettyWebAppContext

public JettyWebAppContext()
Deprecated. never use this... this is only here because Jetty WebApplicationContext is externalizable


JettyWebAppContext

public JettyWebAppContext(String objectName,
                          String originalSpecDD,
                          String sessionManager,
                          Map componentContext,
                          org.apache.geronimo.transaction.context.OnlineUserTransaction userTransaction,
                          ClassLoader classLoader,
                          URL configurationBaseUrl,
                          Set unshareableResources,
                          Set applicationManagedSecurityResources,
                          String displayName,
                          Map contextParamMap,
                          Collection listenerClassNames,
                          boolean distributable,
                          Map mimeMap,
                          String[] welcomeFiles,
                          Map localeEncodingMapping,
                          Map errorPages,
                          org.mortbay.http.Authenticator authenticator,
                          String realmName,
                          Map tagLibMap,
                          int sessionTimeoutSeconds,
                          String policyContextID,
                          String securityRealmName,
                          org.apache.geronimo.security.deploy.DefaultPrincipal defaultPrincipal,
                          PermissionCollection checkedPermissions,
                          PermissionCollection excludedPermissions,
                          Host host,
                          org.apache.geronimo.transaction.context.TransactionContextManager transactionContextManager,
                          org.apache.geronimo.transaction.TrackedConnectionAssociator trackedConnectionAssociator,
                          JettyContainer jettyContainer,
                          org.apache.geronimo.security.jacc.RoleDesignateSource roleDesignateSource,
                          org.apache.geronimo.management.J2EEServer server,
                          org.apache.geronimo.management.J2EEApplication application,
                          org.apache.geronimo.kernel.Kernel kernel)
                   throws Exception,
                          IllegalAccessException,
                          InstantiationException,
                          ClassNotFoundException
Method Detail

getObjectName

public String getObjectName()
Specified by:
getObjectName in interface org.apache.geronimo.management.J2EEManagedObject

isStateManageable

public boolean isStateManageable()
Specified by:
isStateManageable in interface org.apache.geronimo.management.J2EEManagedObject

isStatisticsProvider

public boolean isStatisticsProvider()
Specified by:
isStatisticsProvider in interface org.apache.geronimo.management.J2EEManagedObject

isEventProvider

public boolean isEventProvider()
Specified by:
isEventProvider in interface org.apache.geronimo.management.J2EEManagedObject

getWARDirectory

public URL getWARDirectory()
Specified by:
getWARDirectory in interface org.apache.geronimo.management.geronimo.WebModule

getWARName

public String getWARName()
Specified by:
getWARName in interface org.apache.geronimo.management.geronimo.WebModule

getContainer

public org.apache.geronimo.management.geronimo.WebContainer getContainer()
Specified by:
getContainer in interface org.apache.geronimo.management.geronimo.WebModule

getURLFor

public URL getURLFor()
Specified by:
getURLFor in interface org.apache.geronimo.management.geronimo.WebModule

enterContextScope

public Object enterContextScope(org.mortbay.http.HttpRequest httpRequest,
                                org.mortbay.http.HttpResponse httpResponse)

leaveContextScope

public void leaveContextScope(org.mortbay.http.HttpRequest httpRequest,
                              org.mortbay.http.HttpResponse httpResponse,
                              Object oldScope)

getWebClassLoader

public ClassLoader getWebClassLoader()
Specified by:
getWebClassLoader in interface JettyServletRegistration

doStart

public void doStart()
             throws Exception
Specified by:
doStart in interface org.apache.geronimo.gbean.GBeanLifecycle
Throws:
Exception

doStop

public void doStop()
            throws Exception
Specified by:
doStop in interface org.apache.geronimo.gbean.GBeanLifecycle
Throws:
Exception

doFail

public void doFail()
Specified by:
doFail in interface org.apache.geronimo.gbean.GBeanLifecycle

setContextParamMap

public void setContextParamMap(Map initParameters)

setLocaleEncodingMapping

public void setLocaleEncodingMapping(Map localeEncodingMap)

setListenerClassNames

public void setListenerClassNames(Collection eventListeners)
                           throws ClassNotFoundException,
                                  IllegalAccessException,
                                  InstantiationException
Throws:
ClassNotFoundException
IllegalAccessException
InstantiationException

setErrorPages

public void setErrorPages(Map errorPageMap)

setTagLibMap

public void setTagLibMap(Map tagLibMap)

setSessionTimeoutSeconds

public void setSessionTimeoutSeconds(int seconds)

getDisplayName

public String getDisplayName()

setDisplayName

public void setDisplayName(String displayName)

getDeploymentDescriptor

public String getDeploymentDescriptor()
Specified by:
getDeploymentDescriptor in interface org.apache.geronimo.management.J2EEDeployedObject

getServer

public String getServer()
Specified by:
getServer in interface org.apache.geronimo.management.J2EEDeployedObject

getApplication

public String getApplication()

getJavaVMs

public String[] getJavaVMs()
Specified by:
getJavaVMs in interface org.apache.geronimo.management.J2EEModule

getServlets

public String[] getServlets()
Specified by:
getServlets in interface org.apache.geronimo.management.WebModule

getSessionManager

public String getSessionManager()

registerServletHolder

public void registerServletHolder(org.mortbay.jetty.servlet.ServletHolder servletHolder,
                                  String servletName,
                                  Set servletMappings,
                                  String objectName)
                           throws Exception
Specified by:
registerServletHolder in interface JettyServletRegistration
Throws:
Exception

checkSecurityConstraints

public boolean checkSecurityConstraints(String pathInContext,
                                        org.mortbay.http.HttpRequest request,
                                        org.mortbay.http.HttpResponse response)
                                 throws org.mortbay.http.HttpException,
                                        IOException
Throws:
org.mortbay.http.HttpException
IOException

getGBeanInfo

public static org.apache.geronimo.gbean.GBeanInfo getGBeanInfo()


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