Chapter 24. Transactions

Table of Contents

DOs in Transactions
Status of DOs
Creating DOs
Using DOs
Save and Delete Operations in Transactions
Insert, Update and Delete Operations on the Database
Queries
Caching
Commit of Transactions
Extended Trasaction
First attempt of using JTA API Implementation in DODS
Current JTA API Implementation in DODS

A transaction exactly belongs to one database.

DOs in Transactions

Every DO should belong to a transaction. DOs without transaction exist only for the compatibility with the old DODS.

If a DO belongs to a transaction, the transaction in the DO can not be changed, and the DO can only be used in this transaction. Otherwise, DODS throws an exception.

A DO that belongs to no transaction can not be "attached" to a transaction. This kind of a DO at least belongs to a database and can only be used in this database. Otherwise, DODS throws an exception.

A DO has getTransaction() method that returns its own transaction if has one, or returns null otherwise.