• Post Reply Bookmark Topic Watch Topic
  • New Topic

Container-Manager EntityManager - Automatically joins JTA ?  RSS feed

 
Sandeep Vaid
Ranch Hand
Posts: 392
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

In application-managed EntityManager, we explicitly call entityManager.joinTransaction().
In container-manager Entitymanager does it automaticalls joins JTA ?
 
James Sutherland
Ranch Hand
Posts: 553
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, a container managed EntityManager (i.e. injected, or JNDI looked up) should automatically be JTA managed.

In some servers you may need to set your JPA provider to be integrated with the server in the persistence.xml for this to function.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!