[jboss-jira] [JBoss JIRA] Created: (EJBTHREE-849) @PrePassivate and @PostActivate callbacks not properly handled for nested SFSBS
Brian Stansberry (JIRA)
jira-events at jboss.com
Sat Jan 27 18:36:57 EST 2007
@PrePassivate and @PostActivate callbacks not properly handled for nested SFSBS
-------------------------------------------------------------------------------
Key: EJBTHREE-849
URL: http://jira.jboss.com/jira/browse/EJBTHREE-849
Project: EJB 3.0
Issue Type: Bug
Affects Versions: EJB 3.0 RC9 - Patch 1
Reporter: Brian Stansberry
Fix For: EJB 3.0 RC10 - FD
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.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list