In fact, it is not always GlassFish which locks files but other software does as well - Struts being one offender. We saw this with an earlier release of Struts than the one you referred to. Perhaps some of the changes from 2.0.1 to 2.0.6 have regressed or perhaps they just exercise some other code paths that are causing this.
In GF V2 (starting with build 14) GlassFish contains changes that help with this sort of problem. I realize that does not help you with the product version 9.0 update release 1, but the changes I refer to address this general type of problem quite nicely.
If you are curious about hunting down the actual cause, you can use the tool described here
http://blogs.sun.com/quinn/entry/tool_for_diagnosing_failed_glassfish
to find out what code is opening the locked file(s). It's possible that Struts is opening a stream but not closing it. It's also possible that, if Struts uses its own URLClassLoader, that could explain it because the URLClassLoader class can lock JARs that are on its classpath.
- Tim
[Message sent by forum member 'tjquinn' (tjquinn)]
http://forums.java.net/jive/thread.jspa?messageID=206502