javax.naming.spi.InitialContextFactory
public class SpringInitialContextFactory
extends java.lang.Object
implements javax.naming.spi.InitialContextFactory
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.Constructor | Description |
---|---|
SpringInitialContextFactory() |
Modifier and Type | Method | Description |
---|---|---|
protected org.springframework.beans.factory.BeanFactory |
createContext(org.springframework.core.io.Resource resource) |
|
javax.naming.Context |
getInitialContext(java.util.Hashtable environment) |
|
protected org.springframework.beans.factory.BeanFactory |
loadContext(org.springframework.core.io.Resource resource,
java.lang.String key) |
|
static javax.naming.Context |
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
|
public static javax.naming.Context makeInitialContext()
public javax.naming.Context getInitialContext(java.util.Hashtable environment) throws javax.naming.NamingException
getInitialContext
in interface javax.naming.spi.InitialContextFactory
javax.naming.NamingException
protected org.springframework.beans.factory.BeanFactory loadContext(org.springframework.core.io.Resource resource, java.lang.String key)
protected org.springframework.beans.factory.BeanFactory createContext(org.springframework.core.io.Resource resource)
Copyright © 2005–2018. All rights reserved.