| java.lang.Object org.apache.ojb.otm.core.Transaction
Transaction | public class Transaction (Code) | | Transaction delivers the core function of OTMKit - to manage objects within the
context of a transaction.
author: Raghu Rajah |
Transaction | public Transaction()(Code) | | |
commit | public void commit() throws TransactionException(Code) | | Commit this transaction. A commit notifies all listeners of this transaction. It then
initiates a two phase commit on connections. Since, connections cannot be associated to
more than one transaction at any given point in time, there is no neccessity to identify
transaction.
|
isInProgress | public boolean isInProgress()(Code) | | |
registerConnection | public void registerConnection(OTMConnection connection)(Code) | | Associate a connection to this transaction. A OTMConnection can be registered to atmost one
transaction, while a transaction can manage multiple connections.
Parameters: connection - the connection to register |
registerListener | public void registerListener(TransactionListener listener)(Code) | | Adds a listener to this transaction. Listeners get boundary notifications of this
transaction.
Parameters: listener - the listener of this transaction |
rollback | public void rollback() throws TransactionException(Code) | | Rollback this transaction. A rollback on the transaction, notifies all its listeners. It,
then initiates a rollback on all associated connections.
|
|
|