org.mule.transaction
Class AbstractTransaction

java.lang.Object
  extended byorg.mule.transaction.AbstractTransaction
All Implemented Interfaces:
UMOTransaction
Direct Known Subclasses:
AbstractSingleResourceTransaction, XaTransaction

public abstract class AbstractTransaction
extends java.lang.Object
implements UMOTransaction

This base class provides low level features for transactions

Version:
$Revision: 1.3 $
Author:
Guillaume Nodet

Field Summary
protected  Log logger
           
 
Fields inherited from interface org.mule.umo.UMOTransaction
STATUS_ACTIVE, STATUS_COMMITTED, STATUS_COMMITTING, STATUS_MARKED_ROLLBACK, STATUS_NO_TRANSACTION, STATUS_PREPARED, STATUS_PREPARING, STATUS_ROLLEDBACK, STATUS_ROLLING_BACK, STATUS_UNKNOWN
 
Constructor Summary
AbstractTransaction()
           
 
Method Summary
 void begin()
          Begin the transaction.
 void commit()
          Commit the transaction
protected abstract  void doBegin()
          Really begin the transaction.
protected abstract  void doCommit()
          Commit the transaction on the underlying resource
protected abstract  void doRollback()
          Rollback the transaction on the underlying resource
 boolean isBegun()
           
 boolean isCommitted()
           
 boolean isRollbackOnly()
           
 boolean isRolledBack()
           
 void rollback()
          Rollback the transaction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.mule.umo.UMOTransaction
bindResource, getResource, getStatus, hasResource, setRollbackOnly
 

Field Detail

logger

protected final transient Log logger
Constructor Detail

AbstractTransaction

public AbstractTransaction()
Method Detail

isRollbackOnly

public boolean isRollbackOnly()
                       throws TransactionException
Specified by:
isRollbackOnly in interface UMOTransaction
Throws:
TransactionException

isBegun

public boolean isBegun()
                throws TransactionException
Specified by:
isBegun in interface UMOTransaction
Throws:
TransactionException

isRolledBack

public boolean isRolledBack()
                     throws TransactionException
Specified by:
isRolledBack in interface UMOTransaction
Throws:
TransactionException

isCommitted

public boolean isCommitted()
                    throws TransactionException
Specified by:
isCommitted in interface UMOTransaction
Throws:
TransactionException

begin

public void begin()
           throws TransactionException
Description copied from interface: UMOTransaction
Begin the transaction.

Specified by:
begin in interface UMOTransaction
Throws:
TransactionException

commit

public void commit()
            throws TransactionException
Description copied from interface: UMOTransaction
Commit the transaction

Specified by:
commit in interface UMOTransaction
Throws:
TransactionException

rollback

public void rollback()
              throws TransactionException
Description copied from interface: UMOTransaction
Rollback the transaction

Specified by:
rollback in interface UMOTransaction
Throws:
TransactionException

doBegin

protected abstract void doBegin()
                         throws TransactionException
Really begin the transaction. Note that resources are enlisted yet.

Throws:
TransactionException

doCommit

protected abstract void doCommit()
                          throws TransactionException
Commit the transaction on the underlying resource

Throws:
TransactionException

doRollback

protected abstract void doRollback()
                            throws TransactionException
Rollback the transaction on the underlying resource

Throws:
TransactionException


Copyright © 2003-2005 SymphonySoft Limited. All Rights Reserved.