This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
The spec says that when a persistent context is propagated, it needs an active JTA transaction. After propagation, if an entity manager is called on the component which called it, if the PersistenceContext.TRANSACTION is mentioned, then a new transaction is started.
My question is, what happens to the propagated persistence context?? What was the point of propagating it when a new transaction was to start??
could you please explain the question? I couldnt understand it...
frm watever I understood frm question:
if CMT is used and persistent context is transaction scoped then
1) if a call is made to another bean using CMT, context being TrANSACTION and the method has REQUIRES_NEW then the propagated persistent context will not be used.
2) if a call is made to another bean using CMT, context being TrANSACTION and the method has REQUIRED/MANDATORY then the propagated persistent context will be used as the transaction will be propagted along with persistent context to that method.
hope it helps...
SCDJWS 5.0, SCBCD 5.0, SCWCD 5.0, SCJP 5.0
Joined: May 27, 2008
ok, so this means that if a transaction is not propagated, then a persistent context currently used by it will also not be propagated?? Right??