PreDestroy is not being invoked on Singleton EJB which implements SessionBean interface
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 7
Issue
PreDestroycallback is not being invoked onSingletonEJB which implementsjavax.ejb.SessionBeaninterface.
Resolution
Do not implement javax.ejb.SessionBean interface.
Root Cause
Singleton EJB should not implement the SessionBean interface, because it is out of specification. From the Content from jcp.org is not included.EJB 3.1 specification:
The class may implement, directly or indirectly, the javax.ejb.SessionBean interface. Except for Singleton beans.
SBR
Components
Category
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.