users@glassfish.java.net

ejbPassivate/ejbRemove not being called on shutdown

From: <glassfish_at_javadesktop.org>
Date: Wed, 28 Feb 2007 03:48:58 PST

I'm creating a stateful session bean using the EJB 2.1 spec which creates some TCP connections. When the app server gets stopped I want to close the connections created by the bean.
I've added code to close these connections in the ejbPassivate and ejbRemove methods but neither of them gets called on shutdown.

Has anyone done or tried to do anything similar? If so have I got the right idea expecting the ejbPassivate or ejbRemove method to be called?

Thanks in advance.
[Message sent by forum member 'xerces' (xerces)]

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