> From: Brian [mailto:bbprefix-m...@yahoo.com] 
> Subject: Placing JARs in "..../tomcat/shared/lib" causes leaks when stopping 
> apps?

> Something like this "for each app, the webapploader pretendes 
> to unload all the classes, and if they are shared it is not 
> possible and then the leak happens".

Well, the wording of the above is rather odd; there's no pretending going on, 
and nothing can unload a class directly - that's done only by GC after the 
class becomes unused.

> Is that true? 

Sort of.

> Should I avoid using the shared lib directory?

In almost all cases, yes.  It's safe to use the shared library when the classes 
placed therein truly are library functions (no persistent objects, no keeping 
of references to their callers), or when an object *must* be shared across 
multiple webapps.

> If so, for what was this option created for?

To allow /objects/ to be shared across webapps, in the rare instance that it's 
necessary.  Webapps are intended to be independent of one another, and any 
mingling of their content limits that independence severely - as you are 
observing.

Keep the webapps separate; it's a lot easier on everyone concerned.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


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

Reply via email to