public class ContextBeanFactoryReference extends java.lang.Object implements BeanFactoryReference
As per BeanFactoryReference contract,
release may be called
more than once, with subsequent calls not doing anything. However, calling
getFactory after a
release call will cause an exception.
|Constructor and Description|
Create a new ContextBeanFactoryReference for the given context.
public ContextBeanFactoryReference(ApplicationContext applicationContext)
applicationContext- the ApplicationContext to wrap
public BeanFactory getFactory()
BeanFactoryinstance held by this reference.
public void release()
BeanFactoryinstance referred to by this object is not needed any longer by the client code which obtained the
Depending on the actual implementation of
the actual type of
BeanFactory, this may possibly not actually
do anything; alternately in the case of a 'closeable'
or derived class (such as
may 'close' it, or may 'close' it once no more references remain.
In an EJB usage scenario this would normally be called from
This is safe to call multiple times.