org.mule.tck.testmodels.mule
Class TestTransaction

java.lang.Object
  extended by org.mule.transaction.AbstractTransaction
      extended by org.mule.transaction.AbstractSingleResourceTransaction
          extended by org.mule.tck.testmodels.mule.TestTransaction
All Implemented Interfaces:
org.mule.api.transaction.Transaction

public class TestTransaction
extends org.mule.transaction.AbstractSingleResourceTransaction

A test transaction that does nothing on commit or rollback. The transaction does retain a status so that developers can determine if the the transaction was rolled back or committed.


Field Summary
 
Fields inherited from class org.mule.transaction.AbstractSingleResourceTransaction
key, resource, rollbackOnly, started
 
Fields inherited from class org.mule.transaction.AbstractTransaction
logger
 
Fields inherited from interface org.mule.api.transaction.Transaction
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
TestTransaction()
           
 
Method Summary
protected  void doBegin()
          Really begin the transaction.
protected  void doCommit()
          Commit the transaction on the underlying resource
protected  void doRollback()
          Rollback the transaction on the underlying resource
 
Methods inherited from class org.mule.transaction.AbstractSingleResourceTransaction
begin, bindResource, commit, getId, getResource, getStatus, hasResource, rollback, setRollbackOnly
 
Methods inherited from class org.mule.transaction.AbstractTransaction
fireNotification, isBegun, isCommitted, isRollbackOnly, isRolledBack, isXA, resume, suspend
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestTransaction

public TestTransaction()
Method Detail

doBegin

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

Specified by:
doBegin in class org.mule.transaction.AbstractTransaction
Throws:
org.mule.api.transaction.TransactionException

doCommit

protected void doCommit()
                 throws org.mule.api.transaction.TransactionException
Commit the transaction on the underlying resource

Specified by:
doCommit in class org.mule.transaction.AbstractTransaction
Throws:
org.mule.api.transaction.TransactionException

doRollback

protected void doRollback()
                   throws org.mule.api.transaction.TransactionException
Rollback the transaction on the underlying resource

Specified by:
doRollback in class org.mule.transaction.AbstractTransaction
Throws:
org.mule.api.transaction.TransactionException


Copyright © 2003-2008 MuleSource, Inc.. All Rights Reserved.