org.springframework.beans.factory.access
Interface BeanFactoryReference

All Known Implementing Classes:
ContextBeanFactoryReference, DefaultBeanFactoryReference

public interface BeanFactoryReference

Class used to track a reference to a BeanFactory obtained through a BeanFactoryLocator.

Version:
$Revision: 1.5 $
Author:
Colin Sampaleanu
See Also:
BeanFactoryLocator

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.
 

Method Detail

getFactory

public BeanFactory getFactory()
Returns the BeanFactory instance held by this reference


release

public void release()
             throws FatalBeanException

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.

Throws:
FatalBeanException - if the BeanFactory cannot be released
See Also:
BeanFactoryLocator


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