public class DelegateTransaction extends AbstractTransaction
id, logger, muleContext, timeoutSTATUS_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, unbindTransactionpublic DelegateTransaction(MuleContext muleContext)
protected void doBegin()
throws org.mule.runtime.api.tx.TransactionException
AbstractTransactiondoBegin in class AbstractTransactionorg.mule.runtime.api.tx.TransactionExceptionprotected void doCommit()
throws org.mule.runtime.api.tx.TransactionException
AbstractTransactiondoCommit in class AbstractTransactionorg.mule.runtime.api.tx.TransactionExceptionprotected void doRollback()
throws org.mule.runtime.api.tx.TransactionException
AbstractTransactiondoRollback in class AbstractTransactionorg.mule.runtime.api.tx.TransactionExceptionpublic int getStatus()
throws org.mule.runtime.api.tx.TransactionException
org.mule.runtime.api.tx.TransactionExceptionpublic boolean isBegun()
throws org.mule.runtime.api.tx.TransactionException
isBegun in interface TransactionisBegun in class AbstractTransactionorg.mule.runtime.api.tx.TransactionExceptionpublic boolean isRolledBack()
throws org.mule.runtime.api.tx.TransactionException
isRolledBack in interface TransactionisRolledBack in class AbstractTransactionorg.mule.runtime.api.tx.TransactionExceptionpublic boolean isCommitted()
throws org.mule.runtime.api.tx.TransactionException
isCommitted in interface TransactionisCommitted in class AbstractTransactionorg.mule.runtime.api.tx.TransactionExceptionpublic 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 org.mule.runtime.api.tx.TransactionException
org.mule.runtime.api.tx.TransactionExceptionpublic void setRollbackOnly()
throws org.mule.runtime.api.tx.TransactionException
org.mule.runtime.api.tx.TransactionExceptionpublic boolean isRollbackOnly()
throws org.mule.runtime.api.tx.TransactionException
isRollbackOnly in interface TransactionisRollbackOnly in class AbstractTransactionorg.mule.runtime.api.tx.TransactionExceptionpublic boolean isXA()
isXA in interface TransactionisXA in class AbstractTransactionpublic void resume()
throws org.mule.runtime.api.tx.TransactionException
Transactionresume in interface Transactionresume in class AbstractTransactionorg.mule.runtime.api.tx.TransactionException - if any errorpublic Transaction suspend() throws org.mule.runtime.api.tx.TransactionException
Transactionsuspend in interface Transactionsuspend in class AbstractTransactionorg.mule.runtime.api.tx.TransactionException - if any errorpublic String getId()
getId in interface TransactiongetId in class AbstractTransactionpublic boolean supportsInnerTransaction(Transaction transaction)
public int getTimeout()
getTimeout in interface TransactiongetTimeout in class AbstractTransactionpublic void setTimeout(int timeout)
setTimeout in interface TransactionsetTimeout in class AbstractTransactiontimeout - configures the transactions timeout in millisecondsCopyright © 2003–2017 MuleSoft, Inc.. All rights reserved.