public interface Transaction
Modifier and Type | Method and Description |
---|---|
void |
commit()
This will commit the transaction.
|
void |
finallyRollbackIfNotCommitted()
This is designed to be called in a top level finally block and it will attempt to rollback the transaction IF it
has not already been committed.
|
boolean |
isNewTransaction()
Returns if this is a new transaction.
|
void |
rollback()
This will rollback the transaction.
|
void commit() throws TransactionRuntimeException
org.ofbiz.core.entity.GenericTransactionException
- if the transaction cannot be commitedTransactionRuntimeException
void rollback() throws TransactionRuntimeException
org.ofbiz.core.entity.GenericTransactionException
- if the transaction cannot be rollbackedTransactionRuntimeException
void finallyRollbackIfNotCommitted()
boolean isNewTransaction()
Calls to commit for a nested transaction effectively do nothing relying on the outer transaction to perform the commit.
Calls to rollback for a nested transaction mark the outer transaction as requiring to be rolled back. The outer transaction will eventually rollback, whether commit or rollback is eventually called.
commit()
or rollback()
will actually do anythingCopyright © 2002-2015 Atlassian. All Rights Reserved.