[jboss-dev-forums] [Design of EJB 3.0] - Re: Issues with passivation of nested SFSBs
bstansberry@jboss.com
do-not-reply at jboss.com
Wed Jan 31 14:05:00 EST 2007
"bill.burke at jboss.com" wrote :
| At first, the parent SFSB owns all the children. If a child is "touched" by an invocation, it must ping the parent to replicate the whole tree: parent and all its children.
Easily encapsulated in the StatefulReplicationInterceptor.
anonymous wrote : If the parent is removed, a child is picked as the new "parent".
This will be lot of work, for I'm not sure what gain vs. leaving the old parent context in the cache, but marked "removed" and with refs to any unneeded state nulled out. You've got to:
1) Pick a child (ok, trivial)
2) Move the data to the child (not sure if there are any integration issues)
3) Add all of the parent's children to the new "semi-parent".
4) Notify all the children of the new semi-parent
5) Do a lookup of the ProxiedStatefulBeanContext of each of the children (no direct ref to it) and modify it to point to the new parent.
6) Replace the cached context for the new "semi-parent" so it's no longer a ProxiedStatefulBeanContext, but rather a regular one (otherwise any calls to the new parent will fail).
7) Replicate every affected context so the rest of the cluster knows what you did. Probably should do this in a tx.
anonymous wrote : As for your concurrency problem. I don't think we should code for this and document that that scenario is not supported. SFSBs are supposed to be used by one client, not multiple clients concurrently. This will make things easier IMO.
:-)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4008942#4008942
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4008942
More information about the jboss-dev-forums
mailing list