public class DelegateTransaction extends AbstractTransaction
id, logger, muleContext, timeout
STATUS_ACTIVE, STATUS_COMMITTED, STATUS_COMMITTING, STATUS_MARKED_ROLLBACK, STATUS_NO_TRANSACTION, STATUS_PREPARED, STATUS_PREPARING, STATUS_ROLLEDBACK, STATUS_ROLLING_BACK, STATUS_UNKNOWN
Constructor and Description |
---|
DelegateTransaction(MuleContext muleContext) |
Modifier and Type | Method and Description |
---|---|
void |
bindResource(Object key,
Object resource) |
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
|
String |
getId() |
Object |
getResource(Object key) |
int |
getStatus() |
int |
getTimeout() |
boolean |
hasResource(Object key) |
boolean |
isBegun() |
boolean |
isCommitted() |
boolean |
isRollbackOnly() |
boolean |
isRolledBack() |
boolean |
isXA() |
void |
resume()
Resume the XA transaction
|
void |
setRollbackOnly() |
void |
setTimeout(int timeout) |
boolean |
supports(Object key,
Object resource) |
boolean |
supportsInnerTransaction(Transaction transaction) |
Transaction |
suspend()
Suspend the XA transaction
|
begin, commit, fireNotification, rollback, toString, unbindTransaction
public DelegateTransaction(MuleContext muleContext)
protected void doBegin() throws TransactionException
AbstractTransaction
doBegin
in class AbstractTransaction
TransactionException
protected void doCommit() throws TransactionException
AbstractTransaction
doCommit
in class AbstractTransaction
TransactionException
protected void doRollback() throws TransactionException
AbstractTransaction
doRollback
in class AbstractTransaction
TransactionException
public int getStatus() throws TransactionException
TransactionException
public boolean isBegun() throws TransactionException
isBegun
in interface Transaction
isBegun
in class AbstractTransaction
TransactionException
public boolean isRolledBack() throws TransactionException
isRolledBack
in interface Transaction
isRolledBack
in class AbstractTransaction
TransactionException
public boolean isCommitted() throws TransactionException
isCommitted
in interface Transaction
isCommitted
in class AbstractTransaction
TransactionException
public boolean hasResource(Object key)
public boolean supports(Object key, Object resource)
key
- transactional resource key (i.e jdbc DataSource or jms Connection)resource
- transactional resource (i.e. jdbc Connection or jms Session)public void bindResource(Object key, Object resource) throws TransactionException
TransactionException
public void setRollbackOnly() throws TransactionException
TransactionException
public boolean isRollbackOnly() throws TransactionException
isRollbackOnly
in interface Transaction
isRollbackOnly
in class AbstractTransaction
TransactionException
public boolean isXA()
isXA
in interface Transaction
isXA
in class AbstractTransaction
public void resume() throws TransactionException
Transaction
resume
in interface Transaction
resume
in class AbstractTransaction
TransactionException
- if any errorpublic Transaction suspend() throws TransactionException
Transaction
suspend
in interface Transaction
suspend
in class AbstractTransaction
TransactionException
- if any errorpublic String getId()
getId
in interface Transaction
getId
in class AbstractTransaction
public boolean supportsInnerTransaction(Transaction transaction)
public int getTimeout()
getTimeout
in interface Transaction
getTimeout
in class AbstractTransaction
public void setTimeout(int timeout)
setTimeout
in interface Transaction
setTimeout
in class AbstractTransaction
timeout
- configures the transactions timeout in millisecondsCopyright © 2003–2016 MuleSoft, Inc.. All rights reserved.