org.springframework.beans.factory.access
Class DefaultBeanFactoryReference

java.lang.Object
  extended byorg.springframework.beans.factory.access.DefaultBeanFactoryReference
All Implemented Interfaces:
BeanFactoryReference

public class DefaultBeanFactoryReference
extends Object
implements BeanFactoryReference

Default implementation of BeanFactoryReference, wrapping a newly created BeanFactory, destroying its singletons on release.

Since:
13.02.2004
Author:
Juergen Hoeller

Constructor Summary
DefaultBeanFactoryReference(BeanFactory beanFactory)
           
 
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

DefaultBeanFactoryReference

public DefaultBeanFactoryReference(BeanFactory beanFactory)
Method Detail

getFactory

public BeanFactory getFactory()
Description copied from interface: BeanFactoryReference
Returns the BeanFactory instance held by this reference

Specified by:
getFactory in interface BeanFactoryReference

release

public void release()
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 ref object. 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.

Specified by:
release in interface BeanFactoryReference
See Also:
BeanFactoryLocator


Copyright (C) 2003-2004 The Spring Framework Project.