Provides a standard way of loading a Spring BeanFactory. Subclasses act as a
facade, with the business logic deferred to beans in the BeanFactory. Default
is to use a ContextJndiBeanFactoryLocator ,
which will initialize an XML ApplicationContext from the class path (based on a JNDI
name specified). For a different locator strategy, setBeanFactoryLocator
may be called (before your EJB's ejbCreate method is invoked,
e.g. in setSessionContext). For use of a shared ApplicationContext between
multiple EJBs, where the container class loader setup supports this visibility, you may
instead use a ContextSingletonBeanFactoryLocator .
Alternatively, setBeanFactoryLocator(BeanFactoryLocator) may be called with a custom implementation
of the BeanFactoryLocator interface.
Note that we cannot use final for our implementation of EJB lifecycle
methods, as this would violate the EJB specification.
Provides a standard way of loading a Spring BeanFactory. Subclasses act as a facade, with the business logic deferred to beans in the BeanFactory. Default is to use a ContextJndiBeanFactoryLocator , which will initialize an XML ApplicationContext from the class path (based on a JNDI name specified). For a different locator strategy,
setBeanFactoryLocatormay be called (before your EJB'sejbCreatemethod is invoked, e.g. insetSessionContext). For use of a shared ApplicationContext between multiple EJBs, where the container class loader setup supports this visibility, you may instead use a ContextSingletonBeanFactoryLocator . Alternatively, setBeanFactoryLocator(BeanFactoryLocator) may be called with a custom implementation of the BeanFactoryLocator interface.Note that we cannot use
finalfor our implementation of EJB lifecycle methods, as this would violate the EJB specification.