Hello, Franck.
Good to hear that you find GlassFish to your liking.
I am going to guess that you see this behavior on a Windows system.
Correct?
Locked JAR files on Windows have been an issue for some time, and we
have made some improvements over time. But behavior in some of the JDK
classes themselves can cause this sort of locking, especially when the
JARs appear in the classpath of a class loader and at least one class or
resource is loaded from the JAR.
A few comments...
First, we are currently working on several enhancements that will
improve this situation a great deal. Of course, that does not help you
right now!
Second, we need to find out what process has the file locked. There is
a freeware Windows tool called "handle" that I have found useful. It
displays for each process each file handle that process holds.
http://www.sysinternals.com/utilities/handle.html
Third, if it is the GlassFish process that has the file locked, please
take a look at my blog entry here:
http://blogs.sun.com/quinn/entry/tool_for_diagnosing_failed_glassfish
It explains how to use a very simple utility I wrote that identifies any
code that opens a JAR file that is never closed. I suggest that you
download the tool and then after you have deployed and undeployed the
application, use the tool. Then either send the tool's output to me or
to this list or post it in the GlassFish forum. There are already a few
topics that discuss this problem or feel free to create another one.
Once we look at the output we will know where to focus to find the
problem in your case.
Regards,
- Tim
> Hi,
>
> I'm using Glassfish quite a while now and I am quite happy about it. Thanks!
>
> One quirk I cannot get around with is the following.
>
> If I deploy a web application (in exploded mode) into Glassfish, I cannot
> replace a jar-file in the lib directory. This I can understand, although it
> would be nice if it was possible.
>
> However, after I undeploy the web application, I can still not replace a
> jar-file in the lib directory. I have to stop Glassfish, replace the
> jar-file, restart Glassfish and (possibly) redeploy the application.
>
> Am I doing something wrong? Or is this the actual desired behaviour ... I
> hope not :) .
>
> Thanks in advance,
> Cheers,
> Franck