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:
Transaction

public class TestTransaction
extends 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, txStatusMappings
 
Fields inherited from class org.mule.transaction.AbstractTransaction
id, logger, muleContext
 
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(MuleContext muleContext)
           
 
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
 java.lang.String getTestProperty()
           
 void setTestProperty(java.lang.String testProperty)
           
 
Methods inherited from class org.mule.transaction.AbstractSingleResourceTransaction
begin, bindResource, commit, getResource, getStatus, hasResource, rollback, setRollbackOnly, toString
 
Methods inherited from class org.mule.transaction.AbstractTransaction
fireNotification, getId, isBegun, isCommitted, isRollbackOnly, isRolledBack, isXA, resume, suspend, unbindTransaction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TestTransaction

public TestTransaction(MuleContext muleContext)
Method Detail

doBegin

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

Specified by:
doBegin in class AbstractTransaction
Throws:
TransactionException

doCommit

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

Specified by:
doCommit in class AbstractTransaction
Throws:
TransactionException

doRollback

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

Specified by:
doRollback in class AbstractTransaction
Throws:
TransactionException

getTestProperty

public java.lang.String getTestProperty()

setTestProperty

public void setTestProperty(java.lang.String testProperty)


Copyright © 2003-2010 MuleSoft, Inc.. All Rights Reserved.