> From: Thad Humphries [mailto:thad.humphries@gmail.com]
> Subject: Re: Problems with ImageIO
>
> (1) This leak situation may arise when I use "stop" or
> "reload" on my webapp.
Correct. The JRE keeps a global imageio registry with a reference to a webapp-specific class,
resulting in a slow PermGen memory leak.
> (2) It can also be prevented by placing my JAI and JAI-IMAGE
> I/O jars in CATALINA_HOME/lib or JAVA_HOME/jre/lib/ext vs my
> WEB-INF/lib.
Also correct, since the classes will now be loaded by a global classloader, rather than a
webapp-specific one.
> I prefer to keep the jars in my WEB-INF/lib as it's less
> intrusive to the server manager.
Which includes being easier for anyone installing your webapp. Unfortunately, you have to
pick one poison or the other, since Sun mostly ignored their servlet-spec-required isolation
of webapps when designing the numerous global registries.
I suppose you might try a ServletContextListener that deregisters the JAI classes when your
webapp is being shut down.
- 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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
|