Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.springframework.beans.factory.access
Class BeanFactoryBootstrap  view BeanFactoryBootstrap download BeanFactoryBootstrap.java

java.lang.Object
  extended byorg.springframework.beans.factory.access.BeanFactoryBootstrap

public class BeanFactoryBootstrap
extends java.lang.Object

One singleton to rule them all. Reads System properties, which must contain the definition of a bootstrap bean factory using the Properties syntax supported by PropertiesBeanDefinitionReader.

The name of the bootstrap factory must be "bootstrapBeanFactory". Thus a typical definition might be:

 bootstrapBeanFactory.class=com.mycompany.MyBeanFactory
Use as follows:
 BeanFactory bf = BeanFactoryBootstrap.getInstance().getBeanFactory();

Since:
02.12.2002

Field Summary
static java.lang.String BEAN_FACTORY_BEAN_NAME
           
private  org.springframework.beans.factory.BeanFactory bootstrapFactory
          the singleton instance
private static BeanFactoryBootstrap instance
           
private static org.springframework.beans.BeansException startupException
           
 
Constructor Summary
private BeanFactoryBootstrap()
          Apply rules to load factory.
 
Method Summary
 org.springframework.beans.factory.BeanFactory getBeanFactory()
          Return the BeanFactory managed by the Bootstrap.
static BeanFactoryBootstrap getInstance()
          Return the singleton instance of the bootstrap factory
private static void initializeSingleton()
           
protected static void reinitialize()
          For testing only.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BEAN_FACTORY_BEAN_NAME

public static final java.lang.String BEAN_FACTORY_BEAN_NAME
See Also:
Constant Field Values

instance

private static BeanFactoryBootstrap instance

startupException

private static org.springframework.beans.BeansException startupException

bootstrapFactory

private org.springframework.beans.factory.BeanFactory bootstrapFactory
the singleton instance

Constructor Detail

BeanFactoryBootstrap

private BeanFactoryBootstrap()
                      throws org.springframework.beans.BeansException
Apply rules to load factory.

Method Detail

initializeSingleton

private static void initializeSingleton()

getInstance

public static BeanFactoryBootstrap getInstance()
                                        throws org.springframework.beans.BeansException
Return the singleton instance of the bootstrap factory


reinitialize

protected static void reinitialize()
For testing only. Cleans and reinitalizes the instance. Do not use in a production application!


getBeanFactory

public org.springframework.beans.factory.BeanFactory getBeanFactory()
Return the BeanFactory managed by the Bootstrap.