SPI interface to be implemented by most if not all application contexts.
Provides facilities to configure an application context in addition
to the application context client methods in the
Configuration and lifecycle methods are encapsulated here to avoid
making them obvious to ApplicationContext client code. The present
methods should only be used by startup and shutdown code.
static final java.lang.String LOAD_TIME_WEAVER_BEAN_NAME
Name of the LoadTimeWeaver bean in the factory. If such a bean is supplied,
the context will use a temporary ClassLoader for type matching, in order
to allow the LoadTimeWeaver to process all actual bean classes.
Note that the parent shouldn't be changed: It should only be set outside
a constructor if it isn't available when an object of this class is created,
for example in case of WebApplicationContext setup.
Add a new BeanFactoryPostProcessor that will get applied to the internal
bean factory of this application context on refresh, before any of the
bean definitions get evaluated. To be invoked during context configuration.
Add a new ApplicationListener that will be notified on context events
such as context refresh and context shutdown.
Note that any ApplicationListener registered here will be applied
on refresh if the context is not active yet, or on the fly with the
current event multicaster in case of a context that is already active.
Load or refresh the persistent representation of the configuration,
which might an XML file, properties file, or relational database schema.
As this is a startup method, it should destroy already created singletons
if it fails, to avoid dangling resources. In other words, after invocation
of that method, either all or no singletons at all should be instantiated.
Return the internal bean factory of this application context.
Can be used to access specific functionality of the underlying factory.
Note: Do not use this to post-process the bean factory; singletons
will already have been instantiated before. Use a BeanFactoryPostProcessor
to intercept the BeanFactory setup process before beans get touched.
Generally, this internal factory will only be accessible while the context
is active, that is, in-between refresh() and close().
The isActive() flag can be used to check whether the context
is in an appropriate state.
the underlying bean factory
java.lang.IllegalStateException - if the context does not hold an internal
bean factory (usually if refresh() hasn't been called yet or
if close() has already been called)