public class TomcatEmbedder extends Object
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.| Constructor and Description |
|---|
TomcatEmbedder() |
public static void embed(Properties properties, ClassLoader catalinaCl)
properties - this instance contains all System properties as well as all initialization parameters of the LoaderServletcatalinaCl - The ClassLoader which loaded the ServletConfig classCopyright © 1999–2016 The Apache Software Foundation. All rights reserved.