public class DefaultScopedObject extends Object implements ScopedObject, Serializable
Simply delegates the calls to the underlying
ConfigurableBeanFactory.destroyScopedBean(java.lang.String), Serialized Form
|Constructor and Description|
Creates a new instance of the
|Modifier and Type||Method and Description|
Return the current target object behind this scoped object proxy, in its raw form (as stored in the target scope).
Remove this object from its target scope, for example from the backing session.
public DefaultScopedObject(org.springframework.beans.factory.config.ConfigurableBeanFactory beanFactory, String targetBeanName)
ConfigurableBeanFactorythat holds the scoped target object
targetBeanName- the name of the target bean
public Object getTargetObject()
The raw target object can for example be passed to persistence providers which would not be able to handle the scoped proxy object.
public void removeFromScope()
Note that no further calls may be made to the scoped object afterwards (at least within the current thread, that is, with the exact same target object in the target scope).