[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-1712) Allow options for SMPC per Nested Conversation

Marcus Schmidke (JIRA) jira-events at lists.jboss.org
Mon Dec 3 05:23:51 EST 2007


    [ http://jira.jboss.com/jira/browse/JBSEAM-1712?page=comments#action_12390208 ] 
            
Marcus Schmidke commented on JBSEAM-1712:
-----------------------------------------

Is it sufficient to have a _new_ Persistence Context?

It should be a _nested_ Persistence Context, but I don't know if JPA or Hibernate know about this concept.

The nested Persistence Context should only flush to it's parent Persistence Context, not immediately to the database.

If the Persistence Context of the nested conversation directly flushed to the database, integrity problems will arise if the "detail" view is saved but the "master" view is canceled afterwards.

> Allow options for SMPC per Nested Conversation
> ----------------------------------------------
>
>                 Key: JBSEAM-1712
>                 URL: http://jira.jboss.com/jira/browse/JBSEAM-1712
>             Project: JBoss Seam
>          Issue Type: Feature Request
>          Components: Core
>    Affects Versions: 2.0.0.BETA1
>         Environment: Windows XP, Seam 2.0 Beta, JBoss 4.2
>            Reporter: Andy Gibson
>
> I'd like to request the option to specify that a nested conversation gets it's own entity manager instance as opposed to sharing it with it's parent conversation and other nested conversations. 
> The problem with nested conversations is that you can't actually use them to edit multiple entities since when you flush the PC, you flush it for all conversations. This makes nested conversations only really useful for browsing data, and creating new top level conversation to edit items to isolate the flushes.
> The only alternative is to use a non-Seam managed PC, and make use of the "PC per stateful bean" rule to map a single PC to a single backing bean, but you lose the benefits of a seam managed PC.
> What might be nice is something like :
> @Begin(nested=true, newPC=true)
> and
> <begin-conversation nested="true" newPC="true"/>
> which would indicate that this new nested conversation gets it's own entity manager instance. The attribute would be ignored if this wasn't a nested conversation, and obviously, by default, the attribute is set to false, and a shared PC would be used in the nested conversation in such cases.
> I'm already using one PC per conversation by using top level conversations to edit items, I'd just like to use one PC per nested conversation (where applicable) to get the benefits of nested conversations.
> There are a couple of posts in the forums where I've touched on some of my problems with this issue : 
> http://www.jboss.com/index.html?module=bb&op=viewtopic&t=111681
> http://www.jboss.com/index.html?module=bb&op=viewtopic&t=111384
> http://www.jboss.com/index.html?module=bb&op=viewtopic&t=113362

-- 
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 seam-issues mailing list