users@glassfish.java.net

Re: File locking issue.

From: <glassfish_at_javadesktop.org>
Date: Tue, 06 Mar 2007 11:30:24 PST

Because Windows does not allow a locked file to be renamed or deleted, open streams to a file cause these problems.

Prior to GF V2 build 14 the redeployment and undeployment logic would try to rename or delete files as part of the work, and this is where the locked JAR would cause trouble. Starting in V2 b14 GF will still try to delete the files but will not mind if it cannot do so. A redeployment will succeed (it rewrites the contents of the file without worrying if deleting it fails), an undeployment will succeed, and even a subsequent deployment after an undeployment will work.

The 9.0 ur1 (GF v1) release just does not work this way.

It could be worth using the tool I referred to earlier to understand just how the files are becoming locked. That might suggest a way to work around the problem. If your app has not changed since you used the earlier release of Struts, then would dropping back to an earlier Struts release be an option for you?

I completely understand your preference for staying with a released and supported product. GF V2 beta currently has promoted builds that would be more stable than a development release, of course depending on your tolerance.

- Tim
[Message sent by forum member 'tjquinn' (tjquinn)]

http://forums.java.net/jive/thread.jspa?messageID=206524