DefaultUserTransaction
public interface UserTransaction
Modifier and Type | Method | Description |
---|---|---|
void |
begin() |
Begin the transaction.
|
void |
commit() |
Commit the transaction.
|
int |
getStatus() |
Get the status.
|
void |
rollback() |
Rollback the transaction.
|
void |
setRollbackOnly() |
Set to rollback only.
|
void |
setTransactionTimeout(int seconds) |
Set the transaction timeout.
|
void begin() throws NotSupportedException, SystemException
NotSupportedException
- when nested transaction 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 transaction has been partially
rolled back.HeuristicRollbackException
- when transaction has been rolled back.SecurityException
- when not allowed to commit the transaction.IllegalStateException
- when not associated with a transaction.SystemException
- when a serious error occurs.int getStatus() throws SystemException
SystemException
- when a serious error occurs.void rollback() throws IllegalStateException, SecurityException, SystemException
IllegalStateException
- when not associated with a transaction.SecurityException
- when not allowed to rollback the transaction.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 transaction timeout in secondsSystemException
- when a serious error occurs.Copyright © 2020 Piranha Cloud. All rights reserved.