Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
BaseEjbBean.destroyComponentInstance() should call direct container remove API, not call an @Remove annotated method.
"When the destroy() method is called, and if the underlying EJB was not already removed by direct invocation of a remove method by the application, the container removes the stateful session bean. The @PreDestroy callback must be invoked by the container."
Calling business methods with a side effect of the container removing the EJB does not seem to be what is intended.
Completing this ticket requires an API in OpenEJB to remove a SFSB given just the reference the container gave us earlier.