org.apache.geronimo.jetty
Class JettyWebAppContext

java.lang.Object
  extended byorg.mortbay.http.ResourceCache
      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:
Externalizable, org.apache.geronimo.gbean.GBeanLifecycle, org.mortbay.http.HttpHandler, org.mortbay.util.LifeCycle, Serializable
Direct Known Subclasses:
JettyWebAppJACCContext

public class JettyWebAppContext
extends org.mortbay.jetty.servlet.WebApplicationContext
implements org.apache.geronimo.gbean.GBeanLifecycle

Wrapper for a WebApplicationContext that sets up its J2EE environment.

Version:
$Revision: 1.4 $ $Date: 2004/09/01 17:38:02 $
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class org.mortbay.jetty.servlet.WebApplicationContext
org.mortbay.jetty.servlet.WebApplicationContext.Configuration
 
Nested classes inherited from class org.mortbay.http.ResourceCache
org.mortbay.http.ResourceCache.ResourceMetaData
 
Field Summary
static org.apache.geronimo.gbean.GBeanInfo GBEAN_INFO
           
 
Fields inherited from class org.mortbay.http.HttpContext
__ErrorHandler, __fileClassPathAttr
 
Fields inherited from class org.mortbay.http.ResourceCache
_cache, _cacheSize, _leastRecentlyUsed, _mostRecentlyUsed
 
Constructor Summary
JettyWebAppContext()
           
JettyWebAppContext(URI uri, org.apache.geronimo.naming.java.ReadOnlyContext compContext, org.apache.geronimo.transaction.UserTransactionImpl userTransaction, ClassLoader classLoader, Set unshareableResources, Set applicationManagedSecurityResources, org.apache.geronimo.transaction.context.TransactionContextManager transactionContextManager, org.apache.geronimo.transaction.TrackedConnectionAssociator associator, org.apache.geronimo.kernel.config.ConfigurationParent config, JettyContainer container)
           
 
Method Summary
 void doFail()
           
 void doStart()
           
 void doStop()
           
 boolean getContextPriorityClassLoader()
          getContextPriorityClassLoader.
static org.apache.geronimo.gbean.GBeanInfo getGBeanInfo()
           
 void handle(String pathInContext, String pathParams, org.mortbay.http.HttpRequest httpRequest, org.mortbay.http.HttpResponse httpResponse)
           
protected  void initClassLoader(boolean forceContextLoader)
          init the classloader.
 void setContextPriorityClassLoader(boolean b)
          setContextPriorityClassLoader.
 
Methods inherited from class org.mortbay.jetty.servlet.WebApplicationContext
addEventListener, getConfiguration, getDefaultsDescriptor, getDisplayName, getErrorPage, getExtractWAR, getResource, getResourceAlias, getServletHandler, getUserRealm, getWAR, getWebApplicationHandler, getWebInf, initialize, isDistributable, isIgnoreWebJetty, readExternal, removeAttribute, removeErrorPage, removeEventListener, removeResourceAlias, setAttribute, setConfiguration, setDefaultsDescriptor, setDisplayName, setDistributable, setErrorPage, setExtractWAR, setIgnoreWebJetty, setPermissions, setResourceAlias, setWAR, start, stop, toString, writeExternal
 
Methods inherited from class org.mortbay.jetty.servlet.ServletHttpContext
addLocaleEncoding, addServlet, addServlet, checkSecurityConstraints, getLocaleEncoding, getServletContext, jSecurityCheck, sendError
 
Methods inherited from class org.mortbay.http.HttpContext
addClassPath, addClassPaths, addHandler, addHandler, addPermission, addSecurityConstraint, addVirtualHost, addWelcomeFile, canonicalContextPathSpec, clearSecurityConstraints, destroy, enterContextScope, flushCache, getAttribute, getAttributeNames, getAttributes, getAuthenticator, getClassLoader, getClassPath, getContextPath, getFileClassPath, getHandler, getHandlerIndex, getHandlers, getHosts, getHttpConnection, getHttpContext, getHttpContextName, getHttpServer, getInitParameter, getInitParameterNames, getName, getParentClassLoader, getPermissions, getRealm, getRealmName, getRequestLog, getRequests, getRequestsActive, getRequestsActiveMax, getResponses1xx, getResponses2xx, getResponses3xx, getResponses4xx, getResponses5xx, getStatsOn, getStatsOnMs, getTempDirectory, getVirtualHosts, getWelcomeFile, getWelcomeFiles, handle, initialize, isClassLoaderJava2Compliant, isRedirectNullPath, isStarted, leaveContextScope, loadClass, log, removeHandler, removeHandler, removeVirtualHost, removeWelcomeFile, sendContextError, setAttributes, setAuthenticator, setClassLoader, setClassLoaderJava2Compliant, setClassPath, setContextPath, setHandlers, setHosts, setHttpContextName, setInitParameter, setParentClassLoader, setRealm, setRealmName, setRedirectNullPath, setRequestLog, setStatsOn, setTempDirectory, setVirtualHosts, setWelcomeFiles, startHandlers, statsReset, stop, toString
 
Methods inherited from class org.mortbay.http.ResourceCache
getBaseResource, getEncodingByMimeType, getEncodingMap, getMaxCachedFileSize, getMaxCacheSize, getMimeByExtension, getMimeMap, getResourceBase, getResourceMetaData, setBaseResource, setEncodingMap, setMaxCachedFileSize, setMaxCacheSize, setMimeMap, setMimeMapping, setResourceBase, setTypeEncoding
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

GBEAN_INFO

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

JettyWebAppContext

public JettyWebAppContext()

JettyWebAppContext

public JettyWebAppContext(URI uri,
                          org.apache.geronimo.naming.java.ReadOnlyContext compContext,
                          org.apache.geronimo.transaction.UserTransactionImpl userTransaction,
                          ClassLoader classLoader,
                          Set unshareableResources,
                          Set applicationManagedSecurityResources,
                          org.apache.geronimo.transaction.context.TransactionContextManager transactionContextManager,
                          org.apache.geronimo.transaction.TrackedConnectionAssociator associator,
                          org.apache.geronimo.kernel.config.ConfigurationParent config,
                          JettyContainer container)
Method Detail

getContextPriorityClassLoader

public boolean getContextPriorityClassLoader()
getContextPriorityClassLoader.

Returns:
True if this context should give web application class in preference over the containers classes, as per the servlet specification recommendations.

setContextPriorityClassLoader

public void setContextPriorityClassLoader(boolean b)
setContextPriorityClassLoader.

Parameters:
b - True if this context should give web application class in preference over the containers classes, as per the servlet specification recommendations.

initClassLoader

protected void initClassLoader(boolean forceContextLoader)
                        throws MalformedURLException,
                               IOException
init the classloader. Uses the value of contextPriorityClassLoader to determine if the context needs to create its own classloader.

Throws:
MalformedURLException
IOException

handle

public void handle(String pathInContext,
                   String pathParams,
                   org.mortbay.http.HttpRequest httpRequest,
                   org.mortbay.http.HttpResponse httpResponse)
            throws org.mortbay.http.HttpException,
                   IOException
Specified by:
handle in interface org.mortbay.http.HttpHandler
Throws:
org.mortbay.http.HttpException
IOException

doStart

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

doStop

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

doFail

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

getGBeanInfo

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


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