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 TransactionException
TransactionException
void commit() throws TransactionException
TransactionException
void rollback() throws TransactionException
TransactionException
int getStatus() throws TransactionException
TransactionException
boolean isBegun() throws TransactionException
TransactionException
boolean isRolledBack() throws TransactionException
TransactionException
boolean isCommitted() throws TransactionException
TransactionException
int 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 TransactionException
TransactionException
void setRollbackOnly() throws TransactionException
TransactionException
boolean isRollbackOnly() throws TransactionException
TransactionException
boolean isXA()
void resume() throws TransactionException
TransactionException
- if any errorTransaction suspend() throws TransactionException
TransactionException
- if any errorString getId()
Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.