org.mule.transaction
Class AbstractSingleResourceTransaction
java.lang.Object
org.mule.transaction.AbstractTransaction
org.mule.transaction.AbstractSingleResourceTransaction
- All Implemented Interfaces:
- UMOTransaction
- Direct Known Subclasses:
- JdbcTransaction, JmsClientAcknowledgeTransaction, JmsTransaction, SpringTransactionFactory.SpringTransaction, VMTransaction
- public abstract class AbstractSingleResourceTransaction
- extends AbstractTransaction
This abstract class can be used as a base class for transactions that can enlist
only one resource (such as a JMS session or JDBC connection).
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
key
protected volatile Object key
resource
protected volatile Object resource
started
protected final AtomicBoolean started
committed
protected final AtomicBoolean committed
rolledBack
protected final AtomicBoolean rolledBack
rollbackOnly
protected final AtomicBoolean rollbackOnly
AbstractSingleResourceTransaction
public AbstractSingleResourceTransaction()
begin
public void begin()
throws TransactionException
- Description copied from interface:
UMOTransaction
- Begin the transaction.
- Specified by:
begin
in interface UMOTransaction
- Overrides:
begin
in class AbstractTransaction
- Throws:
TransactionException
commit
public void commit()
throws TransactionException
- Description copied from interface:
UMOTransaction
- Commit the transaction
- Specified by:
commit
in interface UMOTransaction
- Overrides:
commit
in class AbstractTransaction
- Throws:
TransactionException
rollback
public void rollback()
throws TransactionException
- Description copied from interface:
UMOTransaction
- Rollback the transaction
- Specified by:
rollback
in interface UMOTransaction
- Overrides:
rollback
in class AbstractTransaction
- Throws:
TransactionException
getStatus
public int getStatus()
throws TransactionStatusException
- Throws:
TransactionStatusException
getResource
public Object getResource(Object key)
hasResource
public boolean hasResource(Object key)
bindResource
public void bindResource(Object key,
Object resource)
throws TransactionException
- Throws:
TransactionException
setRollbackOnly
public void setRollbackOnly()
getId
public Object getId()
Copyright © 2003-2008 MuleSource, Inc.. All Rights Reserved.