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@10891966
- org.jboss.web.tomcat.tc5.WebAppClassLoader@18775238
- java.net.URLClassLoader@22498184
- org.jboss.web.tomcat.tc5.WebAppClassLoader@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
Show replies by date