org.objectweb.jotm.core.transaction
Interface Demarcable

All Known Subinterfaces:
BasicTransaction, TwoPhaseCommitTransaction
All Known Implementing Classes:
CoreTransaction

public interface Demarcable

The interface reflects a demarcable transaction. Using its methods, it is possible to start and finish the corresponding transaction.


Method Summary
 void abort()
          Aborts transaction.
 void begin()
          Begins transaction.
 void commit()
          Commits transaction.
 

Method Detail

begin

public void begin()
           throws InvalidStateException
Begins transaction. The method starts this transaction.

Throws:
InvalidStateException - if the transaction is in a state different from Interrogable.STATUS_NO_TRANSACTION

commit

public void commit()
            throws TransactionAbortedException,
                   InvalidStateException
Commits transaction. The method commits this transaction.

Throws:
TransactionAbortedException - commit of the transaction did not succeeded and the transaction has been aborted
InvalidStateException - if the transaction is in a state different from Interrogable.STATUS_ACTIVE

abort

public void abort()
           throws InvalidStateException
Aborts transaction. The method aborts this transaction.

Throws:
InvalidStateException - if the transaction is in a state different from Interrogable.STATUS_ACTIVE