public class DummyUserTransaction extends Object implements UserTransaction, Serializable
| Constructor and Description |
|---|
DummyUserTransaction(DummyTransactionManager tm) |
| Modifier and Type | Method and Description |
|---|---|
void |
begin()
Starts a new transaction, and associate it with the calling thread.
|
void |
commit()
Attempt to commit this transaction.
|
int |
getStatus()
Get the status of the transaction.
|
void |
rollback()
Rolls back this transaction.
|
void |
setRollbackOnly()
Mark the transaction so that the only possible outcome is a rollback.
|
void |
setTransactionTimeout(int seconds)
Change the transaction timeout for transactions started by the calling
thread with the
begin() method. |
public DummyUserTransaction(DummyTransactionManager tm)
public void begin()
throws NotSupportedException,
SystemException
begin in interface UserTransactionNotSupportedException - If the calling thread is already
associated with a transaction, and nested transactions are
not supported.SystemException - If the transaction service fails in an
unexpected way.public void commit()
throws RollbackException,
HeuristicMixedException,
HeuristicRollbackException,
SecurityException,
SystemException
commit in interface UserTransactionRollbackException - If the transaction was marked for rollback
only, the transaction is rolled back and this exception is
thrown.SystemException - If the transaction service fails in an
unexpected way.HeuristicMixedException - If a heuristic decision was made and
some some parts of the transaction have been committed while
other parts have been rolled back.HeuristicRollbackException - If a heuristic decision to roll
back the transaction was made.SecurityException - If the caller is not allowed to commit this
transaction.public void rollback()
throws IllegalStateException,
SystemException
rollback in interface UserTransactionIllegalStateException - If the transaction is in a state
where it cannot be rolled back. This could be because the
transaction is no longer active, or because it is in the
prepared state.SystemException - If the transaction service fails in an
unexpected way.public void setRollbackOnly()
throws IllegalStateException,
SystemException
setRollbackOnly in interface UserTransactionIllegalStateException - If the transaction is not in an active
state.SystemException - If the transaction service fails in an
unexpected way.public int getStatus()
throws SystemException
getStatus in interface UserTransactionStatus constants.SystemException - If the transaction service fails in an
unexpected way.public void setTransactionTimeout(int seconds)
throws SystemException
begin() method.setTransactionTimeout in interface UserTransactionseconds - The new timeout value, in seconds. If this parameter
is 0, the timeout value is reset to the default
value.SystemException - If the transaction service fails in an
unexpected way.Copyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.