jQuery in Action, 2nd edition*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes JTA and resource-local Entity Manager Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "JTA and resource-local Entity Manager" Watch "JTA and resource-local Entity Manager" New topic

JTA and resource-local Entity Manager

Chaminda Amarasinghe
Ranch Hand

Joined: May 17, 2006
Posts: 402
Hi Guys,

Can someone explain what is the difference between JTA and resource-local Entity Manager, Why CMT doesnt support resource-local

I expect a clear description than JPA spec 5.5

[ November 11, 2008: Message edited by: Chaminda Amarasinghe ]
Dilshan Edirisuriya
Ranch Hand

Joined: Apr 22, 2006
Posts: 299
"resource-local Entity Manager" are used outside to the Java EE container. As an example if we are dealing with a swing application, JTA is not a possibility. So resource-local transactions are used in this case. So implementation of EntitTransaction interface is required.

Dilshan Edirisuriya SCJP1.4, SCWCD1.4, SCBCD 5
Chaminda Amarasinghe
Ranch Hand

Joined: May 17, 2006
Posts: 402
Thanks Dilshan
It is sorta covered in the JavaRanch Style Guide.
subject: JTA and resource-local Entity Manager
Similar Threads
Can I say an entity manager injected into session bean must be container managed?
transaction-type in persistence.xml
application managed EM can be either JTA or resource-local?
Problem with understanding Transaction Management Demarcation
Contradiction about em.getTranaction() in the spec !!