org.compass.core.transaction
Class AbstractTransaction

java.lang.Object
  extended by org.compass.core.transaction.AbstractTransaction
All Implemented Interfaces:
CompassTransaction, InternalCompassTransaction
Direct Known Subclasses:
JTASyncTransaction, LocalTransaction, SpringSyncTransaction

public abstract class AbstractTransaction
extends Object
implements InternalCompassTransaction


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.compass.core.CompassTransaction
CompassTransaction.TransactionIsolation
 
Constructor Summary
AbstractTransaction()
           
 
Method Summary
 void commit()
          Ends the current unit of work.
protected abstract  void doCommit()
           
protected abstract  void doRollback()
           
 boolean isBegun()
           
 void rollback()
          Force the underlying transaction to roll back.
 void setBegun(boolean begun)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.compass.core.CompassTransaction
wasCommitted, wasRolledBack
 

Constructor Detail

AbstractTransaction

public AbstractTransaction()
Method Detail

setBegun

public void setBegun(boolean begun)
Specified by:
setBegun in interface InternalCompassTransaction

isBegun

public boolean isBegun()

commit

public void commit()
            throws CompassException
Description copied from interface: CompassTransaction
Ends the current unit of work. The transaction will be commited only if it was initiated by the current transcation.

Specified by:
commit in interface CompassTransaction
Throws:
CompassException

rollback

public void rollback()
              throws CompassException
Description copied from interface: CompassTransaction
Force the underlying transaction to roll back.

Specified by:
rollback in interface CompassTransaction
Throws:
CompassException

doCommit

protected abstract void doCommit()
                          throws CompassException
Throws:
CompassException

doRollback

protected abstract void doRollback()
                            throws CompassException
Throws:
CompassException


Copyright (c) 2004-2006 The Compass Project.