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 Summary
Constructors Constructor Description TransactionScopeManager()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract void
clear()
Clears the current Transaction from thread local scope (for implicit transactions).abstract void
clearExternal()
Clears the current Transaction from thread local scope without any check for active transactions.abstract SpiTransaction
getActive()
Return the current Transaction potentially looking in external scope (like Spring).abstract SpiTransaction
getInScope()
Return the current Transaction from internal Ebean scope.abstract void
register(TransactionManager manager)
Register the transaction manager (for use by external transaction scopes).abstract void
replace(SpiTransaction trans)
Replace the current transaction with this one.abstract void
set(SpiTransaction trans)
Set a new Transaction for this serverName and Thread.
-
-
-
Constructor Detail
-
TransactionScopeManager
public TransactionScopeManager()
-
-
Method Detail
-
register
public abstract void register(TransactionManager manager)
Register the transaction manager (for use by external transaction scopes).
-
getInScope
public abstract SpiTransaction getInScope()
Return the current Transaction from internal Ebean scope.
-
getActive
public abstract SpiTransaction getActive()
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 interfaceSpiTransactionScopeManager
-
-