DefaultTransactionManager
public interface TransactionManager
Modifier and Type | Method | Description |
---|---|---|
void |
begin() |
Begin a new transaction.
|
void |
commit() |
Commit the transaction.
|
int |
getStatus() |
Get the status.
|
Transaction |
getTransaction() |
Get the transaction.
|
void |
resume(Transaction transaction) |
Resume the transaction.
|
void |
rollback() |
Rollback the transaction.
|
void |
setRollbackOnly() |
Set to rollback only.
|
void |
setTransactionTimeout(int seconds) |
Set the transaction timeout.
|
Transaction |
suspend() |
Suspend the transaction.
|
void begin() throws NotSupportedException, SystemException
NotSupportedException
- when nested transactions are not supported.SystemException
- when a serious error occurs.void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, IllegalStateException, SystemException
RollbackException
- when the transaction has been rolled back.HeuristicMixedException
- when the transaction was partially
committed.HeuristicRollbackException
- when the transaction was rolled back.SecurityException
- when the transaction is not allowed to commit.SystemException
- when a serious error occurs.IllegalStateException
int getStatus() throws SystemException
SystemException
- when a serious error occurs.Transaction getTransaction() throws SystemException
SystemException
- when a serious error occurs.void resume(Transaction transaction) throws InvalidTransactionException, IllegalStateException, SystemException
transaction
- the transaction to resume.InvalidTransactionException
- when an invalid transaction was
passed in.IllegalStateException
- when the thread is already associated with
a transaction.SystemException
- when a serious error occurs.void rollback() throws IllegalStateException, SecurityException, SystemException
IllegalStateException
- when not associated with a transaction.SecurityException
- when the transaction is not allowed to commit.SystemException
- when a serious error occurs.void setRollbackOnly() throws IllegalStateException, SystemException
IllegalStateException
- when not associated with a transaction.SystemException
- when a serious error occurs.void setTransactionTimeout(int seconds) throws SystemException
seconds
- the timeout in seconds.SystemException
- when a serious error occurs.Transaction suspend() throws SystemException
SystemException
- when a serious error occurs.Copyright © 2020 Piranha Cloud. All rights reserved.