public interface Transaction extends TransactionStatus
TransactionStatus.IllegalTransactionStatusException, TransactionStatus.TransactionException, TransactionStatus.TransactionNotSupportedException
Modifier and Type | Method and Description |
---|---|
boolean |
commit()
Commit the transaction.
|
void |
rollback()
Rollback the transaction.
|
isActive, isCompleted, isNew, isRollbackOnly, setRollbackOnly
boolean commit() throws TransactionStatus.TransactionException
If the transaction has been marked as rollback-only, a rollback action is performed.
true
if the transaction was actually committed, or false
if it was rolled back
because the the transaction has been marked as rollback-onlyIllegalTransactionStatusException
- If the transaction is already completed (that is, committed or rolled
back)TransactionException
- If an error occurred during transaction commitTransactionStatus.TransactionException
void rollback() throws TransactionStatus.TransactionException
IllegalTransactionStatusException
- If the transaction is already completed (that is, committed or rolled
back)TransactionException
- If an error occurred during transaction rollbackTransactionStatus.TransactionException
Copyright © 2018 The Holon Platform. All rights reserved.