users@glassfish.java.net

Sessionbeans / Classloaders / Redeploy

From: <glassfish_at_javadesktop.org>
Date: Wed, 16 Jan 2008 03:41:42 PST

Hi,

I am using GlassFish for a JavaEE Project with stateful session beans. I want to have all session beans accessing a global object network through a singleton. Connected to this object net there is a thread doing work on this object net.

However I currently have the problem that upon redeploy new session beans are placed in a new classloader. Therefore they can not access the same global object network. This is not a big problem itsself as this object network is JPA backed. However the thread is still running and doing stuff on the zombie network. Therfore I have a few question, that I was unable to answer myself crawling through the spec.

1) Is there any way to cleanup all object living in an old pre-redeploy classloader.

2) Will session beans created during the lifetime of one deployment all live in the same classloader?
[Message sent by forum member 'peterka' (peterka)]

http://forums.java.net/jive/thread.jspa?messageID=254162