dev@glassfish.java.net

Memory leak when deploying/undeploying application through CLI

From: Roman Pokhodzhai <rpohod_at_gmail.com>
Date: Tue, 20 Jan 2009 16:53:03 +0200

*com.sun.corba.ee.impl.codegen.CurrentClassLoader*

When you deploy an application from command-line, CurrentClassLoader stores
the classloader of our application in its ThreadLocal field, which is
attached to a httpWorkerThread, and never clears it. HttpWorkerThread runs
even after the application is undeployed. Thus, we have a reference to our
EJBClassLoader after the application is undeployed.



--> com.sun.enterprise.web.connector.grizzly.WorkerThreadImpl_at_0xe210828 (117
bytes) <http://localhost:7000/object/0x0e210828> (field threadLocals:)
--> java.lang.ThreadLocal$ThreadLocalMap_at_0xf76ecf8 (20
bytes)<http://localhost:7000/object/0x0f76ecf8>(field table:)
--> [Ljava.lang.ThreadLocal$ThreadLocalMap$Entry;@0x10b31a90 (2056
bytes)<http://localhost:7000/object/0x10b31a90>(Element 104 of
[Ljava.lang.ThreadLocal$ThreadLocalMap$Entry;@0x10b31a90
:)
--> java.lang.ThreadLocal$ThreadLocalMap$Entry_at_0xf797c58 (28
bytes)<http://localhost:7000/object/0x0f797c58>(field value:)
--> com.sun.enterprise.loader.EJBClassLoader_at_0xf8f3420 (88
bytes)<http://localhost:7000/object/0x0f8f3420>