org.apache.openejb.tomcat.loader
Class TomcatEmbedder
java.lang.Object
org.apache.openejb.tomcat.loader.TomcatEmbedder
public class TomcatEmbedder
- extends java.lang.Object
Ultimately this class does nothing lasting and just calls TomcatHook.hook(java.util.Properties)
This class needs to know the path to the openejb.war file.
With that information this class finds the openejb-loader jar in the openejb.war
essentially creates a "mini-webapp" which is to say it creates a new WebappClassloader
that contains the openejb-loader jar and then uses that classloader to reflectively
call the TomcatHook.hook(java.util.Properties) method which does all the work to load OpenEJB into Tomcat
This messing around is required so that it doesn't matter if the OpenEJBListener,
which does not execute in a webapp classloader, or the LoaderServlet, which does,
calls the TomcatEmbedder. Either way the embedding process starts inside a WebappClassloader
and keeps that very complex code just a little simpler.
|
Method Summary |
static void |
embed(java.util.Properties properties,
java.lang.ClassLoader catalinaCl)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TomcatEmbedder
public TomcatEmbedder()
embed
public static void embed(java.util.Properties properties,
java.lang.ClassLoader catalinaCl)
- Parameters:
properties - this instance contains all System properties as well as all initialization parameters of the LoaderServletcatalinaCl - The ClassLoader which loaded the ServletConfig class
Copyright © 1999-2010 The Apache OpenEJB development community. All Rights Reserved.