[jboss-user] [JBoss Seam] - Re: Nested conversations - potential bug in Manager.beginNes
do-not-reply at jboss.com
Thu Jul 5 08:40:45 EDT 2007
"hkarapuu" wrote : anonymous wrote : IllegalStateException should be thrown if @Begin(nested=true) is encountered and there is no long-running conversation active.
| I think that might cause some difficulties with reuse and recursive use.
| I.e. In crud application i can start creation of a new object from a master list (=starting new conversation), OR from within the creation of another object (=starting nested conversation). In both cases the same @Begin method would be called, and the callee should not concern itself who called it or why.
hkarapuu, do I understand you correctly that you want the following behavior? (The following is the behavior I'd prefer to see if I could choose...)
When @Begin(nested=true) is encountered and there is already a long-running conversation active, a new nested conversation (which is also long-running) gets created.
When @Begin(nested=true) is encountered and there is NO long-running conversation active, a nested conversation does NOT get created. Instead, the temporary conversation being active gets promoted to a long-running conversation. So we get the same behavior in this case as would happen if @Begin (without nested=true) was encountered.
The thing quoted above with the IllegalStateException is not my proposal. Rather, it is my interpretation based on the code of
org.jboss.seam.core.Manager.beginNestedConversation() what the intented behavior probably is.
If I could vote for a behavior, I wouldn't choose the one with the IllegalStateException either. I'd choose the one described in this post.
But clearly, the present behavior where a nested (but temporary instead of long-running) conversation gets created when @Begin(nested=true) gets encountered and there is no long-running conversation active, looks not like intended to me.
anonymous wrote :
| Disclaimer; i'm only evaluating Seam so i might have understood things wrong.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4060784#4060784
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4060784
More information about the jboss-user