-
Bug
-
Resolution: Done
-
Major
-
EJB 3.0 RC9 - Patch 1
-
None
-
None
For nested SFSBs that do not implement a remote interface, the passivation/activation callbacks are not properly invoked.
The problem is that the invocation of StatefulBeanContext.prePassivate() and postActivate() is the responsibility of the bean cache. But, for a nested SFSB without a remote interface, the cached object is not the real context, it's a proxy (ProxiedStatefulBeanContext). The real context is separately cached as a contained element of the parent bean's context.
So, this kind of nested bean is actually passivated/activated as part of passivation/activation of the parent bean. The callbacks should be invoked at the same time they are invoked on the parent. Currently the callbacks are invoked when the cache decides to passivate the proxy context, but the passivation of the proxy context is meaningless – it does not result in serializing the bean instance, so it is incorrect to invoke the callbacks.
See org.jboss.ejb3.test.stateful.unit.NestedBeanUnitTestCase for a demonstration of the failure.
- is blocked by
-
EJBTHREE-882 StatefulTreeCache should abort passivation if bean tree is in use
- Closed
- is related to
-
EJBTHREE-1026 Refactor extended persistence context
- Closed