tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jamie <>
Subject JAR files still locked after Context.stop()
Date Tue, 27 Apr 2010 13:18:29 GMT

I have written an autoupdate web application client whose job it is to
update a main Tomcat application. When updating the application, it
performs the following operations on the main web application:

((Lifecycle) context).stop();
update existing jar files
delete unwanted jar files
((Lifecycle) context).start();

The problem is that the JAR files in the main web application remain
locked, even though its context is stopped successfully. I have tried to
add a System.gc() directly after stopping the context, but this does not
help. Furthermore, I changed the \conf\context.xml to set antiJARLocking
and antiResourceLocking to true, but again, the JAR files remain locked.
My autoupdate client is unable to delete the JAR files in question.

Any idea on how I can either force the Tomcat classloader to unload the
JAR, or force Tomcat to release the lock on the JAR files after the
context is stopped?

I am using the latest version of Tomcat (v6)

Thanks in advance for your suggestions


<Context antiJARLocking="true" antiResourceLocking="true">

<!-- Default set of monitored resources -->

<!-- Uncomment this to disable session persistence across Tomcat
restarts -->
       uncommented below
<Manager pathname="" />

<!-- Uncomment this to enable Comet connection tacking (provides events
          on session expiration as well as webapp lifecycle) -->
<Valve className="org.apache.catalina.valves.CometConnectionManagerValve" />


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message