tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Caldarale, Charles R" <>
Subject RE: tomcat 5.5.25 shared lib and sharing webapp jars
Date Fri, 09 Oct 2009 17:36:53 GMT
> From: Curtis Garman []
> Subject: tomcat 5.5.25 shared lib and sharing webapp jars
> I've got a question about the tomcat 5.5.25 shared there any
> danger of using this almost exclusively if you have a lot of jars that
> are shared among apps.

The danger is that you have essentially glued all your webapps together, and you may not be
able to manipulate (stop/redeploy/start) them individually without serious impacts to the
heap, especially PermGen.

> I know you can but I also saw something somewhere and now again
> (
> production/
> - number 6) about garbage collection only operating on memory that was
> inside the scope of a specific app and because the shared lib stuff
> doesn't belong to specific app it wouldn't get cleaned up.

That's not really what it says.  GC knows nothing about the individual webapps; it operates
on the Java heap as a whole.  The problem with sharing libraries is that they can very easily
retain references to caller's objects and thereby prevent the calling classes from ever being
unloaded when a webapp is redeployed.

> I've got a jvm in development that has about 20 apps in reduce
> the heap size, I moved as many jars as I could to the shared lib
> folder...

Probably a bad idea.  Given the extremely low cost of RAM and the widespread availability
of 64-bit operating environments, you are likely practicing false economy.

 - Chuck

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:
For additional commands, e-mail:

View raw message