public class ContextJndiBeanFactoryLocator extends JndiLocatorSupport implements org.springframework.beans.factory.access.BeanFactoryLocator
This default implementation creates a
ClassPathXmlApplicationContext.
Subclasses may override createBeanFactory(java.lang.String[]) for custom instantiation.
createBeanFactory(java.lang.String[])| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
BEAN_FACTORY_PATH_DELIMITERS
Any number of these characters are considered delimiters between
multiple bean factory config paths in a single String value.
|
CONTAINER_PREFIXlogger| Constructor and Description |
|---|
ContextJndiBeanFactoryLocator() |
| Modifier and Type | Method and Description |
|---|---|
protected ApplicationContext |
createApplicationContext(java.lang.String[] resources)
Create the ApplicationContext instance, given an array of class path resource
Strings which should be combined
|
protected org.springframework.beans.factory.access.BeanFactoryReference |
createBeanFactory(java.lang.String[] resources)
Create the BeanFactory instance, given an array of class path resource Strings
which should be combined.
|
org.springframework.beans.factory.access.BeanFactoryReference |
useBeanFactory(java.lang.String factoryKey)
Load/use a bean factory, as specified by a factory key which is a JNDI
address, of the form
java:comp/env/ejb/BeanFactoryPath. |
convertJndiName, isResourceRef, lookup, lookup, setResourceRefgetJndiEnvironment, getJndiTemplate, setJndiEnvironment, setJndiTemplatepublic static final java.lang.String BEAN_FACTORY_PATH_DELIMITERS
public org.springframework.beans.factory.access.BeanFactoryReference useBeanFactory(java.lang.String factoryKey)
throws org.springframework.beans.BeansException
java:comp/env/ejb/BeanFactoryPath. The
contents of this JNDI location must be a string containing one or more
classpath resource names (separated by any of the delimiters ',; \t\n'
if there is more than one. The resulting BeanFactory (or ApplicationContext)
will be created from the combined resources.useBeanFactory in interface org.springframework.beans.factory.access.BeanFactoryLocatororg.springframework.beans.BeansExceptioncreateBeanFactory(java.lang.String[])protected org.springframework.beans.factory.access.BeanFactoryReference createBeanFactory(java.lang.String[] resources)
throws org.springframework.beans.BeansException
Delegates to createApplicationContext by default,
wrapping the result in a ContextBeanFactoryReference.
resources - an array of Strings representing classpath resource namesorg.springframework.beans.BeansException - if factory creation failedcreateApplicationContext(java.lang.String[]),
ContextBeanFactoryReferenceprotected ApplicationContext createApplicationContext(java.lang.String[] resources) throws org.springframework.beans.BeansException
resources - an array of Strings representing classpath resource namesorg.springframework.beans.BeansException - if context creation failed