tomcat-users mailing list archives

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

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

Jamie


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

<!-- Default set of monitored resources -->
<WatchedResource>WEB-INF/web.xml</WatchedResource>

<!-- 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" />
     -->

</Context>



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message