org.springframework.beans.factory.access
Class SingletonBeanFactoryLocator.CountingBeanFactoryReference
java.lang.Object
org.springframework.beans.factory.access.SingletonBeanFactoryLocator.CountingBeanFactoryReference
- All Implemented Interfaces:
- BeanFactoryReference
- Enclosing class:
- SingletonBeanFactoryLocator
private class SingletonBeanFactoryLocator.CountingBeanFactoryReference
- extends java.lang.Object
- implements BeanFactoryReference
BeanFactoryReference implementation for this locator.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
beanFactory
private BeanFactory beanFactory
groupContextRef
private BeanFactory groupContextRef
SingletonBeanFactoryLocator.CountingBeanFactoryReference
public SingletonBeanFactoryLocator.CountingBeanFactoryReference(BeanFactory beanFactory,
BeanFactory groupContext)
getFactory
public BeanFactory getFactory()
- Description copied from interface:
BeanFactoryReference
- Return the
BeanFactory
instance held by this reference.
- Specified by:
getFactory
in interface BeanFactoryReference
release
public void release()
throws FatalBeanException
- Description copied from interface:
BeanFactoryReference
- Indicate that the
BeanFactory
instance referred to by this object is not
needed any longer by the client code which obtained the BeanFactoryReference
.
Depending on the actual implementation of BeanFactoryLocator
, and
the actual type of BeanFactory
, this may possibly not actually
do anything; alternately in the case of a 'closeable' BeanFactory
or derived class (such as ApplicationContext
)
may 'close' it, or may 'close' it once no more references remain.
In an EJB usage scenario this would normally be called from
ejbRemove()
and ejbPassivate()
.
This is safe to call multiple times.
- Specified by:
release
in interface BeanFactoryReference
- Throws:
FatalBeanException
- if the BeanFactory
cannot be released- See Also:
BeanFactoryLocator
,
ContextBeanFactoryReference
,
ConfigurableApplicationContext.close()