[jboss-dev] Multiple classLoaders for a single WAR file on Tomcat
Clebert Suconic
csuconic at redhat.com
Mon Aug 6 10:52:53 EDT 2007
On that case, shouldn't we have only 2 classLoaders then?
Adrian wrote:
> I assume this is because Servlets can be individually reloaded?
>
> On Fri, 2007-08-03 at 17:11 -0500, Clebert Suconic wrote:
>> 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
>> _______________________________________________
>> jboss-development mailing list
>> jboss-development at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/jboss-development
More information about the jboss-development
mailing list