wood burning stoves 2.0*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Resource Local Transactions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Resource Local Transactions" Watch "Resource Local Transactions" New topic
Author

Resource Local Transactions

Nikhil Jain
Ranch Hand

Joined: May 15, 2005
Posts: 385
Are resource local transaction propogated?


SCJP 1.4, SCWCD 1.4, SCBCD 1.5
Sergio Tridente
Ranch Hand

Joined: Mar 22, 2007
Posts: 329

Do you mean "resource-local entity manager transactions"?

I don't think so.

As per the specs:

ejb-persistence, section 5.5

A container-managed entity manager must be a JTA entity manager. JTA entity managers are only specified for use in Java EE containers.
An application-managed entity manager may be either a JTA entity manager or a resource-local entity manager.


ejb-persistence, section 5.6

When a container-managed entity manager is used, the lifecycle of the persistence context is always managed automatically, transparently to the application, and the persistence context is propagated with the JTA transaction.


ejb-persistence, section 5.6.3

As described in section 5.1, a single persistence context may correspond to one or more JTA entity manager instances (all associated with the same entity manager factory).
The persistence context is propagated across the entity manager instances as the JTA transaction is propagated.
Propagation of persistence contexts only applies within a local environment. Persistence contexts are not propagated to remote tiers.


Finally, and more important (ejb-persistence, section 5.7):

[...] The extended persistence context obtained from the application-managed entity manager is a stand-alone persistence context´┐Żit is not propagated with the transaction.


SCJP 1.4 (88%) - SCJP 5.0 Upgrade (93%) - SCWCD 1.4 (97%) - SCBCD 5.0 (98%)
Vinay Nath
Ranch Hand

Joined: Jul 06, 2008
Posts: 85
Only JTA transactions are propagated.


SCDJWS 5.0, SCBCD 5.0, SCWCD 5.0, SCJP 5.0
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Resource Local Transactions
 
Similar Threads
resource manager local transaction
ejb-local-ref and ejb-ref
JTA and Resource Local Entity Manager
Using joinTransaction() on resource-local entity managers.
Doubt in JTA & resource-local entity managers