Package org.apache.xbean.spring.jndi
Class SpringInitialContextFactory
java.lang.Object
org.apache.xbean.spring.jndi.SpringInitialContextFactory
- All Implemented Interfaces:
InitialContextFactory
A simple JNDI initial context which loads the JNDI namespace from a spring.xml configuration file.
The spring.xml configuration file can be specified by the
Context.PROVIDER_URL
property
which can be any spring resource string (classpath://foo.xml, or file://foo/bar.xml or a URL)
otherwise the jndi.xml file is found on the classpath.- Version:
- $Revision: 657 $
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.springframework.beans.factory.BeanFactory
createContext
(org.springframework.core.io.Resource resource) getInitialContext
(Hashtable environment) protected org.springframework.beans.factory.BeanFactory
loadContext
(org.springframework.core.io.Resource resource, String key) static Context
A factory method which can be used to initialise a singleton JNDI context from inside a Spring.xml such that future calls to new InitialContext() will reuse it
-
Constructor Details
-
SpringInitialContextFactory
public SpringInitialContextFactory()
-
-
Method Details
-
makeInitialContext
A factory method which can be used to initialise a singleton JNDI context from inside a Spring.xml such that future calls to new InitialContext() will reuse it -
getInitialContext
- Specified by:
getInitialContext
in interfaceInitialContextFactory
- Throws:
NamingException
-
loadContext
protected org.springframework.beans.factory.BeanFactory loadContext(org.springframework.core.io.Resource resource, String key) -
createContext
protected org.springframework.beans.factory.BeanFactory createContext(org.springframework.core.io.Resource resource)
-