Here is how I fix this type of problem.
I start the server and use a profiler to see how many class loaders I
have. Then I deploy the app, and note new class loaders. Finally, I
undeploy the application and see which of the new class loaders have
not been garbage collected. Now you use your profiler to see what
is holding on to the class loader (the GC roots that have a hard
reference chain to the class loader).
I strongly suggest you use YourKit to profile the app. You can get a
free license as an Apache committer, but I'm not sure how. If you
are a codehaus committer, the YourKit license key is xircles.
Alternatively, I can take a look at this next week.
-dain
On Jan 11, 2008, at 3:45 PM, Jacek Laskowski wrote:
Hi,
I've been trying to fix the issue OPENEJB-746 Command line tool
Deploy/Undeploy asymmetry [1] for the past *couple* days and can't
seem to find a solution for it. Once a file of a module's loaded in a
classloader (via xbean-finder's ResourceFinder) it's locked and the
module itself can't be deleted. A file can be deleted via File.delete
iff no classloaders hold it or the files within (if it's a jar file).
Could anyone lend me a hand with it? I'm stuck.
[1] https://issues.apache.org/jira/browse/OPENEJB-746
Jacek
--
Jacek Laskowski
http://www.JacekLaskowski.pl