tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vijay <>
Subject Configuring tomcat to release the webapp jar file handles
Date Wed, 06 Jan 2010 06:12:15 GMT
    I have a webapp that has 300 jar files bundled in WEB-INF/lib. Most of
the classes in these jar files need to be loaded during the startup of the
webapp. Does tomcat release the jar file handles once the class loader is
done loading the classes? It does not seem to be the case.
Ideally, tomcat should close the jar file handles that the webapp no longer

Is there a way to configure tomcat to have an agressive policy to close
unused file handles?
I looked at the tomcat configuration documentation, and did not find any way
to configure this.
The Tomcat version I am using is 5.5.28 and the platform is windows server

Interestingly, when I looked at Tomcat version 5.5.27 on Linux, the number
of open jar file handles associated with the tomcat process was zero.

Is this behaviour platform specific?

I explored the source code of WebappClassLoader to find that the class
loader periodically tries to free the file handles of jars that are not
being used. (ref :

Any pointers/ suggestions are greatly appreciated!

Thanks in advance,

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message