org.springframework.context.access
Class DefaultBeanFactoryLocator

org.springframework.beans.factory.access.SingletonBeanFactoryLocator
  |
  +--org.springframework.context.access.DefaultBeanFactoryLocator

public class DefaultBeanFactoryLocator
extends SingletonBeanFactoryLocator

Variant of SingletonBeanFactoryLocator which creates its internal bean factory reference definition as an ApplicationContext instead of SingletonBeanFactoryLocator's BeanFactory. For almost all usage scenarios, this will not make a difference, since withing that ApplicationContext or BeanFactory you are still free to create either BeanFactories or ApplicationContexts. The main reason one would need to use this class is if BeanPostProcessing (or other ApplicationContext specific features are needed in the bean reference definition itself.

Note: This class uses beanRefContext.xml as the default name for the bean factory reference definition. It is not possible nor legal to share definitions with SingletonBeanFactoryLocator, at the same time.

Author:
colin sampaleanu
Version: $Revision: 1.5 $
See Also: LocatorFactory

Field Summary
 final static StringBEANS_REFS_XML_NAME
           

Method Summary
 static BeanFactoryLocatorgetInstance()
          Returns an instance which uses the default "beanRefContext.xml", as the name of the definition file(s).
 static BeanFactoryLocatorgetInstance(String selector)
          Returns an instance which uses the the specified selector, as the name of the definition file(s).

Methods inherited from class org.springframework.beans.factory.access.SingletonBeanFactoryLocator
useFactory

Field Detail

BEANS_REFS_XML_NAME

public final static String BEANS_REFS_XML_NAME
Method Detail

getInstance

public static BeanFactoryLocator getInstance()
throws org.springframework.beans.FatalBeanException
Returns an instance which uses the default "beanRefContext.xml", as the name of the definition file(s). All resources returned by the current thread's context classloader's getResources() method with this name will be combined to create a definition, which is just a BeanFactory.

getInstance

public static BeanFactoryLocator getInstance(String selector)
throws org.springframework.beans.FatalBeanException
Returns an instance which uses the the specified selector, as the name of the definition file(s). All resources returned by the current thread's context classloader's getResources() method with this name will be combined to create a definition, which is just a a BeanFactory.
Parameters:
selector - the name of the resource(s) which will be read and combine to form the definition for the KeyedSingletonBeanFactoryLocator instance

Association Links

to Class java.lang.String

to Class java.util.HashMap