Two Laptop Bag
The moose likes Object Relational Mapping and the fly likes Details of Application Managed EM Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Object Relational Mapping
Reply Bookmark "Details of Application Managed EM" Watch "Details of Application Managed EM" New topic
Author

Details of Application Managed EM

Mohammad Jaber
Ranch Hand

Joined: Apr 10, 2006
Posts: 46
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


OCP , SCJP 5.0
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 16624

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


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Mohammad Jaber
Ranch Hand

Joined: Apr 10, 2006
Posts: 46
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

Joined: Feb 05, 2001
Posts: 16624

In Session you cannot create nested transactions.

Mark
 
IntelliJ Java IDE
 
subject: Details of Application Managed EM
 
Threads others viewed
Mock question about EntityManager
JPA with JSF and Concurrency
Java Beat Question - persi. cntxt
EntityManager types in JPA
Toplink-essentials JPA Provider
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com