Module io.ebean.core
Class DefaultTransactionScopeManager
java.lang.Object
io.ebeaninternal.server.transaction.TransactionScopeManager
io.ebeaninternal.server.transaction.DefaultTransactionScopeManager
- All Implemented Interfaces:
SpiTransactionScopeManager
- Direct Known Subclasses:
ExternalTransactionScopeManager
Manages the transaction scoping using a Ebean thread local.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionactive()Return the current Transaction potentially looking in external scope (like Spring).final voidclear()Clears the current Transaction from thread local scope (for implicit transactions).final voidClears the current Transaction from thread local scope without any check for active transactions.final SpiTransactioninScope()Return the current Transaction from internal Ebean scope.voidregister(TransactionManager manager) Register the transaction manager (for use by external transaction scopes).final voidreplace(SpiTransaction trans) Replace the current transaction with this one.final voidset(SpiTransaction trans) Set a new Transaction for this serverName and Thread.
-
Constructor Details
-
DefaultTransactionScopeManager
public DefaultTransactionScopeManager()
-
-
Method Details
-
register
Description copied from class:TransactionScopeManagerRegister the transaction manager (for use by external transaction scopes).- Specified by:
registerin classTransactionScopeManager
-
inScope
Description copied from class:TransactionScopeManagerReturn the current Transaction from internal Ebean scope.- Specified by:
inScopein classTransactionScopeManager
-
active
Description copied from class:TransactionScopeManagerReturn the current Transaction potentially looking in external scope (like Spring).- Specified by:
activein classTransactionScopeManager
-
replace
Description copied from class:TransactionScopeManagerReplace 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- Specified by:
replacein classTransactionScopeManager
-
set
Description copied from class:TransactionScopeManagerSet a new Transaction for this serverName and Thread.- Specified by:
setin classTransactionScopeManager
-
clear
public final void clear()Description copied from class:TransactionScopeManagerClears the current Transaction from thread local scope (for implicit transactions).- Specified by:
clearin classTransactionScopeManager
-
clearExternal
public final void clearExternal()Description copied from class:TransactionScopeManagerClears the current Transaction from thread local scope without any check for active transactions. Intended for use with external transactions.- Specified by:
clearExternalin classTransactionScopeManager
-