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.