Class JndiServiceImpl
- java.lang.Object
-
- org.hibernate.engine.jndi.internal.JndiServiceImpl
-
- All Implemented Interfaces:
Serializable
,JndiService
,Service
public class JndiServiceImpl extends Object implements JndiService
Standard implementation of JNDI services.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description JndiServiceImpl(Map configurationValues)
Constructs a JndiServiceImpl
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addListener(String jndiName, NamespaceChangeListener listener)
Adds the specified listener to the given JNDI namespace.void
bind(String jndiName, Object value)
Binds a value into JNDI by name.static Properties
extractJndiProperties(Map configurationValues)
Given a hodgepodge of properties, extract out the ones relevant for JNDI interaction.Object
locate(String jndiName)
Locate an object in JNDI by namevoid
unbind(String jndiName)
Unbind a value from JNDI by name.
-
-
-
Constructor Detail
-
JndiServiceImpl
public JndiServiceImpl(Map configurationValues)
Constructs a JndiServiceImpl- Parameters:
configurationValues
- Map of configuration settings, some of which apply to JNDI support.
-
-
Method Detail
-
extractJndiProperties
public static Properties extractJndiProperties(Map configurationValues)
Given a hodgepodge of properties, extract out the ones relevant for JNDI interaction.- Parameters:
configurationValues
- The map of config values- Returns:
- The extracted JNDI specific properties.
-
locate
public Object locate(String jndiName)
Description copied from interface:JndiService
Locate an object in JNDI by name- Specified by:
locate
in interfaceJndiService
- Parameters:
jndiName
- The JNDI name of the object to locate- Returns:
- The object found (may be null).
-
bind
public void bind(String jndiName, Object value)
Description copied from interface:JndiService
Binds a value into JNDI by name.- Specified by:
bind
in interfaceJndiService
- Parameters:
jndiName
- The name under which to bind the objectvalue
- The value to bind
-
unbind
public void unbind(String jndiName)
Description copied from interface:JndiService
Unbind a value from JNDI by name.- Specified by:
unbind
in interfaceJndiService
- Parameters:
jndiName
- The name under which the object is bound
-
addListener
public void addListener(String jndiName, NamespaceChangeListener listener)
Description copied from interface:JndiService
Adds the specified listener to the given JNDI namespace.- Specified by:
addListener
in interfaceJndiService
- Parameters:
jndiName
- The JNDI namespacelistener
- The listener
-
-