11.4. JDO vs. J2EE transactions

Each of J2EE and JDO provide their own mechanisms for managing transactions. In JDO this is the javax.jdo.Transaction object returned to applications from the persistence manager’s currentTransaction() method. In J2EE it is the javax.transaction.UserTransaction object. The UserTransaction is made available to EJBs through their session, entity or message-driven context objects, and to other J2EE components through JNDI lookups.

In the managed environment, JDO implementations can synchronize their transactions with the distributed J2EE transactions. This design feature is central to JDO’s ability to operate in these tiers. Where the container is managing transactions on behalf of a component, transaction demarcation ...

Get Java™ Data Objects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.