11.3. Transactions in JDO
Earlier in this chapter, we briefly mentioned that, in a flat transaction model, the calling thread is associated with a transaction. In JDO, the PersistenceManager represents the application's view of any persistent data. Logically, it is here that this association must occur. To separate out the functionality from the PersistenceManager itself, JDO defines a javax.jdo.Transaction interface. This Transaction has a one-to-one relationship with the PersistenceManager, meaning that if parallel transaction execution is required in an application, then multiple persistence managers must be obtained from the factory. (Refer to Chapter 1 for a discussion of transient and persistence instances.)
The Transaction interface by ...
Get Core 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.