|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.core.env.PropertySource<Context>
org.springframework.jndi.JndiPropertySource
public class JndiPropertySource
PropertySource implementation that reads properties from
a JNDI Context.
Context.lookup(String),
DefaultWebEnvironment| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.springframework.core.env.PropertySource |
|---|
PropertySource.StubPropertySource |
| Field Summary | |
|---|---|
static String |
JNDI_PROPERTY_SOURCE_ENABLED_FLAG
Name of property used to determine if a JndiPropertySource
should be registered by default: "jndiPropertySourceEnabled" |
static String |
JNDI_PROPERTY_SOURCE_NAME
JNDI context property source name: "jndiPropertySource" |
| Fields inherited from class org.springframework.core.env.PropertySource |
|---|
logger, name, source |
| Constructor Summary | |
|---|---|
JndiPropertySource()
Create a new JndiPropertySource with the default name
"jndiPropertySource" and create a new InitialContext
as the source object. |
|
JndiPropertySource(String name)
Create a new JndiPropertySource with the given name and
create a new InitialContext as the source object. |
|
JndiPropertySource(String name,
Context source)
Create a new JndiPropertySource with the given name and
JNDI Context. |
|
JndiPropertySource(String name,
Properties jndiEnvironment)
Create a new JndiPropertySource with the given name and
use the given jndiEnvironment properties to create a new
InitialContext as the source object. |
|
| Method Summary | |
|---|---|
Object |
getProperty(String name)
Look up and return the given name from the source JNDI Context. |
| Methods inherited from class org.springframework.core.env.PropertySource |
|---|
containsProperty, equals, getName, getSource, hashCode, named, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String JNDI_PROPERTY_SOURCE_NAME
public static final String JNDI_PROPERTY_SOURCE_ENABLED_FLAG
JndiPropertySource
should be registered by default: "jndiPropertySourceEnabled"
| Constructor Detail |
|---|
public JndiPropertySource()
throws JndiLookupFailureException
JndiPropertySource with the default name
"jndiPropertySource" and create a new InitialContext
as the source object.
JndiLookupFailureException - if a new InitialContext
cannot be created.
public JndiPropertySource(String name)
throws JndiLookupFailureException
JndiPropertySource with the given name and
create a new InitialContext as the source object.
JndiLookupFailureException - if a new InitialContext
cannot be created.
public JndiPropertySource(String name,
Properties jndiEnvironment)
throws JndiLookupFailureException
JndiPropertySource with the given name and
use the given jndiEnvironment properties to create a new
InitialContext as the source object.
JndiLookupFailureException - if a new InitialContext
cannot be created.
public JndiPropertySource(String name,
Context source)
JndiPropertySource with the given name and
JNDI Context.
| Method Detail |
|---|
public Object getProperty(String name)
throws JndiLookupFailureException
Context.
getProperty in class PropertySource<Context>name - the property key to find
JndiLookupFailureExceptionPropertyResolver.getRequiredProperty(String)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||