Am 11.04.2015 um 10:59 schrieb Philippe Marschall:
Hi

I tried Tomcat 8.0.15 and the latest 8 svn to use ParallelWebappClassLoader.

 From reading [1] I get the impression that the following inside
<Server> in server.xml or inside <Context> in context.xml should be
enough.
In the docs (http://tomcat.apache.org/tomcat-8.0-doc/config/loader.html) I only see, that it may be nested inside a context element. It should not matter whether the context is defined in server.xml (not preferred) or in its own file.


<Loader
  loaderClass="org.apache.catalina.loader.ParallelWebappClassLoader"/>

However Tomcat keeps using
org.apache.catalina.loader.WebappClassLoader which is not parallel
capable.
I have tested a fairly simple web app, with only one jsp as follows:

conf/Catalina/localhost/test.xml:
<Context>
<Loader loaderClass="org.apache.catalina.loader.ParallelWebappClassLoader" />
</Context>

and webapps/test/index.jsp:
ClassLoader: <%= this.getClass().getClassLoader().getParent() %>

which gives me (when accessed at test/index.jsp):
ClassLoader: ParallelWebappClassLoader context: test delegate: false ----------> Parent Classloader: java.net.URLClassLoader@264a1535


Maybe you have spelled an attribute/tag name wrong?

Regards
 Felix

Looking at the code I have a hard time figuring out how it's supposed to work
WebappLoader.loaderClass is initialized to WebappClassLoader and never
set to anything else.
Also StandardContext.startInternal() hard codes the loader class to
WebappLoader so I wonder whether setting className would also be
ignored.

  [1] https://tomcat.apache.org/tomcat-8.0-doc/config/loader.html

Cheers
Philippe

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to