Class JndiPropertiesLoader
java.lang.Object
com.saperion.common.config.loader.AbstractPropertiesLoader
com.saperion.common.config.loader.JndiPropertiesLoader
- All Implemented Interfaces:
PropertiesLoader
This PropertiesLoader loads Properties via JNDI. The JNDI lookup path to be used can be configured by
using the according constructor.
An instance of this FilePropertiesLoader can be used in several threads concurrently.
- Author:
- sts
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionJndiPropertiesLoader(String jndiPath) Constructs aJndiPropertiesLoaderusing the given JNDI lookup path. -
Method Summary
Modifier and TypeMethodDescriptiongetLookupLocation(PropertiesResource propertiesResource) Returns the JNDI lookup path used by thisPropertiesLoaderinstance when it tries to load thePropertiesResourcevia JNDI.load(PropertiesResource propertiesResource) Loads the givenPropertiesResourceif present.toString()Methods inherited from class com.saperion.common.config.loader.AbstractPropertiesLoader
loadAsMap
-
Constructor Details
-
JndiPropertiesLoader
Constructs aJndiPropertiesLoaderusing the given JNDI lookup path. JNDI lookup path is appended as prefix to thePropertiesResourcename when thisPropertiesLoaderloads aPropertiesResource.- Parameters:
jndiPath- the JNDI lookup path to use for loading thePropertiesResources via JNDI. May not be null or empty.
-
-
Method Details
-
load
Description copied from interface:PropertiesLoaderLoads the givenPropertiesResourceif present. Returns the properties as aPropertiesobject.- Parameters:
propertiesResource- thePropertiesResourceto load.- Returns:
- the loaded
Properties - Throws:
ConfigurationException- if thePropertiesResourcecould not be loaded.- See Also:
-
getLookupLocation
Returns the JNDI lookup path used by thisPropertiesLoaderinstance when it tries to load thePropertiesResourcevia JNDI.- Parameters:
propertiesResource- the resource in question.- Returns:
- JNDI lookup path used by this
PropertiesLoaderinstance for the givenPropertiesResource.
-
toString
-