"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.
Me too.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4060784#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...