Interface ContainerTransactionManager

All Superinterfaces:
TransactionManager

public interface ContainerTransactionManager extends TransactionManager
A ContainerTransactionManager is a thread-safe API that allows to manage transactions of an underlying data source.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Start a transaction on the managed data source
    void
    If there is an active transaction commit it.
    boolean
    True, if the transaction manager was marked for rollback only for the currently active transaction
    void
    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 transaction
      RollbackException - 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