Application Managed Entity Manager by R4R Team

Application-managed entity manager are always EXTENDED. When we create an entity manager inside a transaction, the entity manager automatically join the current transaction. If the entity manager is created outside a transaction, the entity manager will queue the modification operations. 

1. entityManager.joinTransaction() is called when a JTA transaction is active for a JTA entity manager
2. entityManager.getTransaction().begin() is called for a RESOURCE_LOCAL entity manager
3. the entity manager join the transaction and all the queued operations will then be executed to synchronize the persistence context.

It is not legal to call entityManager.joinTransaction() if no JTA transaction is involved.
Leave a Comment:
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!