[jboss-dev] Multiple classLoaders for a single WAR file on Tomcat
Clebert Suconic
csuconic at redhat.com
Fri Aug 3 18:11:48 EDT 2007
This is probably a question for Remy:
Why Tomcat creates multiple ClassLoaders for every deployment?
Is this by design or this is a leak?
For a single WAR, I'm seeing 4 classLoaders deployed just wasting
PermGeneration memory.
For example, I deployed a single WAR, and I've got this Servlet loaded
by 4 distinct classLoaders. and this is a standard behavior I have seen
on Tomcat for a long time already.
org.jboss.on.plugins.servlet.test.Counter:
- java.net.URLClassLoader at 10891966
- org.jboss.web.tomcat.tc5.WebAppClassLoader at 18775238
- java.net.URLClassLoader at 22498184
- org.jboss.web.tomcat.tc5.WebAppClassLoader at 8238932
Also... if you use any other profiler (besides the ClassLoader analysis
I've written on JBossProfiler) you could be foolished by them as those
classes won't have any instances... Just the classDef loaded on the heap.
Clebert
More information about the jboss-development
mailing list