java.lang.Object
io.ebeaninternal.server.transaction.TransactionScopeManager
- All Implemented Interfaces:
SpiTransactionScopeManager
- Direct Known Subclasses:
DefaultTransactionScopeManager
Manages the Transactions typically held in a ThreadLocal.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract SpiTransactionactive()Return the current Transaction potentially looking in external scope (like Spring).abstract voidclear()Clears the current Transaction from thread local scope (for implicit transactions).abstract voidClears the current Transaction from thread local scope without any check for active transactions.abstract SpiTransactioninScope()Return the current Transaction from internal Ebean scope.abstract voidregister(TransactionManager manager) Register the transaction manager (for use by external transaction scopes).abstract voidreplace(SpiTransaction trans) Replace the current transaction with this one.abstract voidset(SpiTransaction trans) Set a new Transaction for this serverName and Thread.
-
Constructor Details
-
TransactionScopeManager
public TransactionScopeManager()
-
-
Method Details
-
register
Register the transaction manager (for use by external transaction scopes). -
inScope
Return the current Transaction from internal Ebean scope. -
active
Return the current Transaction potentially looking in external scope (like Spring). -
set
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
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:
replacein interfaceSpiTransactionScopeManager
-