users@glassfish.java.net

Re: Classloader Leaking

From: Stephen Connolly <stephen.alan.connolly_at_gmail.com>
Date: Fri, 5 Feb 2010 15:04:28 +0000

enums have some fancy logic to handle serialization/deserialization which
causes them to stay for a while... but it's logic was written correctly, so
when eventually all references are gone, they can be unloaded.

On 5 February 2010 13:57, <glassfish_at_javadesktop.org> wrote:

> I've tried that already. My Stateless Session Bean has only one field which
> is an injtected instance of EntityManager. I added a @PReDestroy method to
> set it to null, but debugging while undeploying, I realized that it was null
> already.
>
> One thing I came across is that if your hibernate entities contains enums
> (@Enumerated) then all of them get stuck in memory. If you remove all the
> enums from there, then they get collected after undeployment.
> Unfortunatelly, SLSB, proxies and $__javassist__$, are never removed. They
> stay in the current ClassLoader with no instance associated.
> [Message sent by forum member 'mmilanez' (mmilanez_at_gmail.com)]
>
> http://forums.java.net/jive/thread.jspa?messageID=384990
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>