users@glassfish.java.net

Re: Sessionbeans / Classloaders / Redeploy

From: Mahesh Kannan <Mahesh.Kannan_at_Sun.COM>
Date: Wed, 16 Jan 2008 10:23:08 -0800

glassfish_at_javadesktop.org wrote:
> Is this inside a web application? Because then you could use a Context Listener to stop the thread, clean the singleton when the web application is undeployed (as the Context Listener will be notified of such events).
>
> If it is just inside an EJB module... I think the EJB spec does not like you creating your own threads... for these reasons among others. Not sure if there are any events/listeners for such modules. There were none last time I looked, but I have not used EJB in a long time :).
>
No there are no listener support in EJB (yet).

But in EJB3.1, Singleton beans are first class citizens! I think the
application will be notified (using callbacks) about shutdown / undeploy
> Good luck!
> [Message sent by forum member 'greeneyed' (greeneyed)]
>
> http://forums.java.net/jive/thread.jspa?messageID=254252
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>