> From: Christopher Schultz [mailto:[EMAIL PROTECTED] > Subject: Re: Tomcat not close file when webapps is stopped > > I'm guessing that Giovanni isn't explicitly opening > struts.jar from his own WEB-INF/lib directory
Good point - I was thinking more of the .log and .properties files. > Is there any reason that Tomcat (or the JVM, probably) would leave > a JAR file open like that? JAR files are normally the responsibility of the classloader; I'm not familiar enough with struts to know if it has it's own classloader or is making use of the one for the webapp. JAR files usually are left open until the associated classloader is garbage collected and references to the JarFile object disappear; at that point, the finalizer() is invoked to close the file. However, Tomcat's WebappClassLoader does contain a stop() method, which does go through and close all the JAR files it has opened. There's also a closeJARs() method, which is called periodically to close JAR files that haven't been accessed for a while. Since the application was stopped, I would expect the WebappClassLoader.stop() method to have been called, thereby releasing Tomcat's use of the struts.jar file. Consequently, I still suspect that either a separate classloader is involved, or some non-class resource has been accessed from the JAR file, and that hasn't been closed. - 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 start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]