[jboss-user] [JBoss Seam] - Re: Feature request regarding nested conversations

jacob.orshalick do-not-reply at jboss.com
Wed Sep 19 11:00:59 EDT 2007

"wschwendt" wrote : This exactly is the motive why I opened this tread: to request a better (or more elegant) way to transfer state (an ending result) back to the parent conversation when the nested conversation ends.

I absolutely agree with you guys that this is a must if you could simply carry the required state changes (and maintain the snapshot of the original conversation for back-button purposes) the problem would be resolved.  The issue is if you directly write into the parent conversation, the back-button is always going to cause problems in master-details scenarios unless a snapshot exists.

e.g. if Person has addresses added and this is updated to the parent conversation, backing up to the page that does not show the addresses will still persist the addresses on submit as they are a part of that conversation. 

Spring Web Flow provides a very elegant solution to this through its continuation approach but warn of the potential for high-memory usage.  This could be limited if you could specify ONLY the objects that need a snapshot (which is essentially what I've been doing by cloning).

"matt.drees" wrote : I wonder if you could create a new persistence context in the nested conversation, merge everything down to it from the parent context, do your editing, and then when you're done, either merge everything back, or flush the child persistence context and refresh the appropriate entities in the parent context. 

This is definitely, interesting, will have to look into it.  It would be nice if the @PerNestedConversation (which was mentioned before) or some other annotation indicated this type of snapshot behavior.  Currently, it looks like it simply means the object is not visible to the nested conversation and is recreated if needed (the documentation also says don't use it).  This would be an easy way to specify only which objects you wanted a snapshot of to limit memory usage in a continuation approach.

Any other thoughts?


By the way, thanks for the tip on the quotes Matt :)

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4086175#4086175

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4086175

More information about the jboss-user mailing list