public interface Transaction
| Modifier and Type | Field and Description |
|---|---|
static int |
STATUS_ACTIVE |
static int |
STATUS_COMMITTED |
static int |
STATUS_COMMITTING |
static int |
STATUS_MARKED_ROLLBACK |
static int |
STATUS_NO_TRANSACTION |
static int |
STATUS_PREPARED |
static int |
STATUS_PREPARING |
static int |
STATUS_ROLLEDBACK |
static int |
STATUS_ROLLING_BACK |
static int |
STATUS_UNKNOWN |
| Modifier and Type | Method and Description |
|---|---|
void |
begin()
Begin the transaction.
|
void |
bindResource(Object key,
Object resource) |
void |
commit()
Commit the transaction
|
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 |
rollback()
Rollback the transaction
|
void |
setRollbackOnly() |
void |
setTimeout(int timeout) |
boolean |
supports(Object key,
Object resource) |
Transaction |
suspend()
Suspend the XA transaction
|
static final int STATUS_ACTIVE
static final int STATUS_MARKED_ROLLBACK
static final int STATUS_PREPARED
static final int STATUS_COMMITTED
static final int STATUS_ROLLEDBACK
static final int STATUS_UNKNOWN
static final int STATUS_NO_TRANSACTION
static final int STATUS_PREPARING
static final int STATUS_COMMITTING
static final int STATUS_ROLLING_BACK
void begin()
throws org.mule.runtime.api.tx.TransactionException
org.mule.runtime.api.tx.TransactionExceptionvoid commit()
throws org.mule.runtime.api.tx.TransactionException
org.mule.runtime.api.tx.TransactionExceptionvoid rollback()
throws org.mule.runtime.api.tx.TransactionException
org.mule.runtime.api.tx.TransactionExceptionint getStatus()
throws org.mule.runtime.api.tx.TransactionException
org.mule.runtime.api.tx.TransactionExceptionboolean isBegun()
throws org.mule.runtime.api.tx.TransactionException
org.mule.runtime.api.tx.TransactionExceptionboolean isRolledBack()
throws org.mule.runtime.api.tx.TransactionException
org.mule.runtime.api.tx.TransactionExceptionboolean isCommitted()
throws org.mule.runtime.api.tx.TransactionException
org.mule.runtime.api.tx.TransactionExceptionint getTimeout()
void setTimeout(int timeout)
timeout - configures the transactions timeout in millisecondsboolean hasResource(Object key)
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)void bindResource(Object key, Object resource) throws org.mule.runtime.api.tx.TransactionException
org.mule.runtime.api.tx.TransactionExceptionvoid setRollbackOnly()
throws org.mule.runtime.api.tx.TransactionException
org.mule.runtime.api.tx.TransactionExceptionboolean isRollbackOnly()
throws org.mule.runtime.api.tx.TransactionException
org.mule.runtime.api.tx.TransactionExceptionboolean isXA()
void resume()
throws org.mule.runtime.api.tx.TransactionException
org.mule.runtime.api.tx.TransactionException - if any errorTransaction suspend() throws org.mule.runtime.api.tx.TransactionException
org.mule.runtime.api.tx.TransactionException - if any errorString getId()
Copyright © 2003–2017 MuleSoft, Inc.. All rights reserved.