org.apache.tomee.loader
Class TomcatEmbedder
java.lang.Object
org.apache.tomee.loader.TomcatEmbedder
public class TomcatEmbedder
- extends Object
Ultimately this class does nothing lasting and just calls TomcatHook.hook(java.util.Properties)
This class needs to know the path to the tomee.war file.
With that information this class finds the openejb-loader jar in the tomee.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.
| 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(Properties properties,
ClassLoader catalinaCl)
- Starts to embed process.
- 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–2015 The Apache Software Foundation. All rights reserved.