[jboss-user] [JBoss Seam] - Re: EntityManager: For newbies or to close gaps in your know

toni do-not-reply at jboss.com
Thu Nov 30 16:59:37 EST 2006


@bf081

I found another thing you forgot to mention:

anonymous wrote : You even don't have to call the merge() method since the entities never get DETACHED. So you might ask what is the "normal" (transaction scoped) persistence context good for?

One of the disatvantages of using an extended persistent context is that the transaction lasts for a long time, which is maybe not what you want.

If you go into the extreme case, then it might span until the user finally logs out. If during this time an error occurs, then all other actions will be undone.

Which makes me wonder, when and how a transaction finally is commited in an extended persistent context? I mean which of the statefull session beans do we have to destroy, if many are involved in the transaction.

I guess by ending the conversation using @End, wer surely destroy all SFSB and the current extended persistent manager, thereby commiting the current transaction. Is that correct? Maybe somebody can contribute to what I have said?


@justinwalsh

I have a question regarding:

anonymous wrote : The SMPC takes the concept of an EPC a little further by integrating the JSF lifecycle with that of the stateful component. Effectively what the SMPC achieves is the removal of LIE when traversing objects outside the scope of your session bean (there's more to it than that - but for now that will do). So in your JSF, if you traversed the customer --> addresses relationship (after outjecting a customer object) you'll avoid the LIE issue. 

Does that mean that the the Entity will still be attached to the persistent manager or will it be unattached, but modified in such a way that calls to uninitialzed values will not generate LIE's?

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

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



More information about the jboss-user mailing list