Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Details of Application Managed EM

 
Mohammad Jaber
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello ,
can any body please describe in details the relation between EntityManager , PersistenceContext and Transactions on Application Managed EntityManager Env. , and why i can't have 2 different transactions created by the same entitymanager , and does each entitymanager uses only one connection to the DB , i can't find any documents regarding that , Thanks in advance
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, it can be a long discussion, so why not just post a link to a Hibernate wiki page that explains Sessions and Transactions, since a Session is the same as an EntityManager the concepts are the same, at least (98.95% of it)

http://www.hibernate.org/42.html

Mark
 
Mohammad Jaber
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for reply , iam not Hibernate Expert but it seems that single hibernate session allows me to create more than one transaction , the thing that is not valid for JPA , why is this behaviour on JPA , any other hints or description !!!
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In Session you cannot create nested transactions.

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic