Class SimpleTransactionScope
java.lang.Object
org.springframework.transaction.support.SimpleTransactionScope
- All Implemented Interfaces:
org.springframework.beans.factory.config.Scope
public class SimpleTransactionScope
extends Object
implements org.springframework.beans.factory.config.Scope
A simple transaction-backed
Scope
implementation, delegating to
TransactionSynchronizationManager
's resource binding mechanism.
NOTE: Like SimpleThreadScope
,
this transaction scope is not registered by default in common contexts. Instead,
you need to explicitly assign it to a scope key in your setup, either through
ConfigurableBeanFactory.registerScope(java.lang.String, org.springframework.beans.factory.config.Scope)
or through a CustomScopeConfigurer
bean.
- Since:
- 4.2
- Author:
- Juergen Hoeller
- See Also:
-
SimpleThreadScope
ConfigurableBeanFactory.registerScope(java.lang.String, org.springframework.beans.factory.config.Scope)
CustomScopeConfigurer
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
registerDestructionCallback
(String name, Runnable callback)
-
Constructor Details
-
SimpleTransactionScope
public SimpleTransactionScope()
-
-
Method Details
-
get
- Specified by:
get
in interfaceorg.springframework.beans.factory.config.Scope
-
remove
- Specified by:
remove
in interfaceorg.springframework.beans.factory.config.Scope
-
registerDestructionCallback
- Specified by:
registerDestructionCallback
in interfaceorg.springframework.beans.factory.config.Scope
-
resolveContextualObject
- Specified by:
resolveContextualObject
in interfaceorg.springframework.beans.factory.config.Scope
-
getConversationId
- Specified by:
getConversationId
in interfaceorg.springframework.beans.factory.config.Scope
-