Package org.oreodata.transaction

This package contains an API for an extended OREO API that is meant to support ACID transactions.

See:
          Description

Interface Summary
TransactionalDataSource An interface that represents the contract of an Oreo DataSource that supports transactions.
TransactionScreener A subinterface of DataListener that allows the implementing object to prescreen transactions.
 

Class Summary
Transaction  
 

Exception Summary
TransactionAbortedException  
TransactionException  
TransactionVetoException An exception indicating that a listener object has vetoed the transaction.
UnknownTransactionException  
 

Package org.oreodata.transaction Description

This package contains an API for an extended OREO API that is meant to support ACID transactions. First of all, note that this is a work in progress. As such, it is subject to change. Also, we are very interested in whatever feedback we get.

The TransactionalDataSource interface is the contract that an object must comploy with in order to wrap up a transactional data source as an OREO data source object. Currently, the only concrete implementation is the JDBCTransactionalDataSource object. This interface defines methods for the CRUD (create-read-update-delete) operations that take into account the transaction of which the operation is a part.

The way to start a transaction is to use the newTransaction method to create a new transaction object. The return value is a unique transaction ID that is basically a handle to the transaction context you just created. By using the versions of the insert/update/delete operations with the extra txnID parameter, you are adding operations to that transaction. The changes you make are committed using the commit method.

An extra subinterface is defined for transaction-aware listeners, TransactionScreener which is notified of a transaction just prior to a commit. This allows you to define objects that veto a transaction based on validation criteria.

Author:
Jonathan Revusky