users@glassfish.java.net

RE: Glassfish keeps handles to jar-files of undeployed Web apps

From: Franck de Bruijn <franck.de.bruijn_at_chello.nl>
Date: Thu, 31 Aug 2006 08:21:56 +0200

Hi Tim,

Great answer, thanks.

First of all, since Glassfish is not officially released, I cannot expect
everything to work flawlessly. I am in the process of evaluating Glassfish
and building some demo apps with it. For me this issue is nothing more than
a quirk; Since I can work around it (restarting glassfish), it's no
showstopper for me yet.

I'll follow your advice though; Let's see if I can pinpoint the situation a
little bit more.

I'll let you know when I know more ...

Cheers,
Franck

-----Original Message-----
From: Timothy.Quinn_at_Sun.COM [mailto:Timothy.Quinn_at_Sun.COM]
Sent: Wednesday, August 30, 2006 11:30 PM
To: users_at_glassfish.dev.java.net
Subject: Re: Glassfish keeps handles to jar-files of undeployed Web apps

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

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
For additional commands, e-mail: users-help_at_glassfish.dev.java.net