You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Juan Espinosa <pc...@adinet.com.uy> on 2007/02/21 21:18:08 UTC

Tomcat locks jars after undeploying web application

Hi to all im having problems with tomcat and windows. The struts2-core jar
get locked when i do an undeploy of my web application. I found that in
tomcat you can put a property to avoid lock of jars…also i found a lot of
posts that say that this property is not working…

Anyone has "fight" with issue ??? Any advice is welcome….



I copy this from tomcat web site

want to redeploy web applications, how do I prevent resources from getting
locked? 

Most locking issues will occur with JARs from /WEB-INF/lib, and are useally
caused by access through URLs. Tomcat has mechanisms to allow avoiding
locking. In Tomcat 5.0, a mechanism exists to prevent locking when accessing
resources using the getResource method of the URL classloader (many
applications, such as Xerces, do not set the use of caching to false before
opening the URL connection, causing locking). If such a call occurs,
resources inside the JARs will be extracted to the work directory of the web
application. In Tomcat 5.5, this mechanism is disabled by default (as it has
a non negligible influence on startup times, and is often useless), and can
be enabled using the antiJARLocking attribute of the Context element. There
is another lock prevention mechanism in Tomcat 5.5 (antiResourceLocking
attribute), which will cause the web application files to be copied to the
temp folder and run from this location. This has a larger impact on web
application startup times, but obviously prevents locking on all resources
of the web application. This also allows more flexible management operations
as none of the web application resources will be locked, even while the web
application is running (as a special note, when making changes JSPs without
reloading the application, the changes has to be duplicated to the path
where the web application resources have been copied in the temp folder). 


-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.441 / Virus Database: 268.18.3/694 - Release Date: 20/02/2007
13:44