PDA

View Full Version : Prevent Locking of Exploded Wars


Kees de Kooter
20-10-2008, 13:39
It is at development time often very convenient to work with exploded wars. Tweaks to JSP files can be made on the fly, without the need to redeploy. Tomcat picks up the changes straight away. The downside is that some jars (ehcache for one) retain some kind of lock when the war is undeployed.

Fortunately the tomcat developers took care of this. Add the following to $CATALINA_HOME/conf/context.xml (this is the file all deployed webapps 'inherit' from) and those locks will not appear anymore.

<Context antiJARLocking="true">

Kees

kjkoster
20-10-2008, 18:18
Hi Kees,

Thanks for the advise.

I was wondering if such locking is operating system dependent. I never encountered it.

Also, do you have an example of a stack trace that occurs when this flag is needed? That way I'll know when to use this flag.

Kees Jan

Kees de Kooter
20-10-2008, 23:07
I suppose it is a windows-only issue.

No stack trace, just a matter not being able to delete the entire exploded app tree.