Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

application managed EntityManagers

anagha desai
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Reading "EJB3 in action " about application managed entity managers

My understanding was that such entity managers can ONLY JOIN an existing Tx

Here is an excerpt from book ::

As we hinted in the beginning of this section, unlike container-managed
EntityManagers, application-managed EntityManagers do not automatically participate
in an enclosing transaction. Instead, they must be asked to join an
enclosing JTA transaction by calling the joinTransaction method

However in Chapter 12 - the book also shows an example where an application managed entity manager in a Java EE5 container is starting and committing a transaction .

Is this an error or are App managed Entity managers allowed to both Join and initiate JTA Transactions ?

  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic