public class SimpleTransactionScope extends Object implements org.springframework.beans.factory.config.Scope
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.
SimpleThreadScope
,
ConfigurableBeanFactory.registerScope(java.lang.String, org.springframework.beans.factory.config.Scope)
,
CustomScopeConfigurer
Constructor and Description |
---|
SimpleTransactionScope() |
Modifier and Type | Method and Description |
---|---|
Object |
get(String name,
org.springframework.beans.factory.ObjectFactory<?> objectFactory) |
String |
getConversationId() |
void |
registerDestructionCallback(String name,
Runnable callback) |
Object |
remove(String name) |
Object |
resolveContextualObject(String key) |
public Object get(String name, org.springframework.beans.factory.ObjectFactory<?> objectFactory)
get
in interface org.springframework.beans.factory.config.Scope
@Nullable public Object remove(String name)
remove
in interface org.springframework.beans.factory.config.Scope
public void registerDestructionCallback(String name, Runnable callback)
registerDestructionCallback
in interface org.springframework.beans.factory.config.Scope
@Nullable public Object resolveContextualObject(String key)
resolveContextualObject
in interface org.springframework.beans.factory.config.Scope
@Nullable public String getConversationId()
getConversationId
in interface org.springframework.beans.factory.config.Scope