Package com.sap.cds.transaction.spi
Interface ContainerTransactionManager
- All Superinterfaces:
TransactionManager
A ContainerTransactionManager is a thread-safe API that allows to manage
transactions of an underlying data source.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
begin()
Start a transaction on the managed data sourcevoid
commit()
If there is an active transaction commit it.boolean
True, if the transaction manager was marked for rollback only for the currently active transactionvoid
rollback()
If there is an active transaction roll it back.Methods inherited from interface com.sap.cds.transaction.TransactionManager
isActive, setRollbackOnly
-
Method Details
-
begin
void begin()Start a transaction on the managed data source -
commit
void commit()If there is an active transaction commit it.- Throws:
TransactionRequiredException
- if there is no active transactionRollbackException
- if the transaction has been rolled back
-
rollback
void rollback()If there is an active transaction roll it back.- Throws:
TransactionRequiredException
- if there is no active transaction
-
isRollbackOnly
boolean isRollbackOnly()True, if the transaction manager was marked for rollback only for the currently active transaction- Returns:
- true if
TransactionManager.setRollbackOnly()
was called for the transaction, false otherwise
-