Class TransactionScopeManager

java.lang.Object
io.ebeaninternal.server.transaction.TransactionScopeManager
All Implemented Interfaces:
SpiTransactionScopeManager
Direct Known Subclasses:
DefaultTransactionScopeManager

public abstract class TransactionScopeManager extends Object implements SpiTransactionScopeManager
Manages the Transactions typically held in a ThreadLocal.
  • Constructor Details

    • TransactionScopeManager

      public TransactionScopeManager()
  • Method Details

    • register

      public abstract void register(TransactionManager manager)
      Register the transaction manager (for use by external transaction scopes).
    • inScope

      public abstract SpiTransaction inScope()
      Return the current Transaction from internal Ebean scope.
    • active

      public abstract SpiTransaction active()
      Return the current Transaction potentially looking in external scope (like Spring).
    • set

      public abstract void set(SpiTransaction trans)
      Set a new Transaction for this serverName and Thread.
    • clear

      public abstract void clear()
      Clears the current Transaction from thread local scope (for implicit transactions).
    • clearExternal

      public abstract void clearExternal()
      Clears the current Transaction from thread local scope without any check for active transactions. Intended for use with external transactions.
    • replace

      public abstract void replace(SpiTransaction trans)
      Replace the current transaction with this one.

      Used for Background fetching and Nested transaction scopes.

      Used for background fetching. Replaces the current transaction with a 'dummy' transaction. The current transaction is given to the background thread so it can continue the fetch.

      Specified by:
      replace in interface SpiTransactionScopeManager