wood burning stoves 2.0*
The moose likes EJB and other Java EE Technologies and the fly likes Transaction Context and Persistance context Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Transaction Context and Persistance context" Watch "Transaction Context and Persistance context" New topic
Author

Transaction Context and Persistance context

asdf kumar
Greenhorn

Joined: Jan 27, 2012
Posts: 1
Hi Team, as my knowledge in ejb persistence, if i am using transaction scoped persistence context, the persistence context is propagated to other ejb calls also under same transaction. For example, If I have called EJB2 from EJB1(under transaction1) the same transaction and persistence context is propagated to EJB2 and if any change is made to the managed entity inside EJB2, it will be reflected to the database after transaction completion.

But in the mentioned code, I have to do EntityManager.merge on managed entity "studBean". Kindly help me to clarify my understanding.




I am calling "StudProcessorBean " bean inside "CalculatorBean" through injection. As per my understanding, the "modifyName()" method should not use merge. But without this call, Student bean is not synchronised with the data base. Kindly help me.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Transaction Context and Persistance context
 
Similar Threads
Transaction through EJB3
SLSB Transaction scoped EntityManager calling SFSB Extended EntityManager
Understanding Persistence Context Propagation
Transactional and Extended Scoped Persistence Context does not work as per spec.
Performance MDB