Package com.sap.cds.services.transaction
Interface TransactionManager
public interface TransactionManager
Interface to abstract on
TransactionManager
instances provided by different frameworks.
The TransactionManager
provides the ability to start and to commit or rollback transactions.-
Method Summary
-
Method Details
-
getName
String getName()The name of theTransactionManager
. It needs to be unique among all transaction managers.- Returns:
- the name of the
TransactionManager
-
isActive
boolean isActive()- Returns:
- true, if a transaction is currently active
-
begin
void begin()Starts a new transaction -
commit
void commit()Commits the current transaction -
rollback
void rollback()Rollbacks the current transaction -
isRollbackOnly
boolean isRollbackOnly()- Returns:
- true, if the transaction was marked as rollback only
-
setRollbackOnly
void setRollbackOnly()Marks the transaction as rollback only
-