|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.context.access.ContextBeanFactoryReference
public class ContextBeanFactoryReference
ApplicationContext-specific implementation of BeanFactoryReference, wrapping a newly created ApplicationContext, closing it on release.
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.
ConfigurableApplicationContext.close()
Constructor Summary | |
---|---|
ContextBeanFactoryReference(ApplicationContext applicationContext)
Create a new ContextBeanFactoryReference for the given context. |
Method Summary | |
---|---|
BeanFactory |
getFactory()
Returns the BeanFactory instance held by this reference. |
void |
release()
Indicate that the BeanFactory instance referred to by this object is not needed any longer by the client code which obtained the ref object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ContextBeanFactoryReference(ApplicationContext applicationContext)
applicationContext
- the ApplicationContext to wrapMethod Detail |
---|
public BeanFactory getFactory()
BeanFactoryReference
getFactory
in interface BeanFactoryReference
public void release()
BeanFactoryReference
In an EJB usage scenario this would normally be called from ejbRemove and ejbPassivate.
This is safe to call multiple times.
release
in interface BeanFactoryReference
BeanFactoryLocator
,
ContextBeanFactoryReference
,
ConfigurableApplicationContext.close()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |