Top Description Constructors Methods
org.hibernate.internal.util.jndi

public final Class JndiHelper

extends Object
Class Inheritance
Annotations
@Deprecated
Imports
java.util.Hashtable, .Map, .Properties, javax.naming.Context, .InitialContext, .Name, .NameNotFoundException, .NamingException, org.hibernate.engine.jndi.internal.JndiServiceImpl

Deprecated

As JNDI access should get routed through org.hibernate.engine.jndi.spi.JndiService

Helper for dealing with JNDI.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static void
bind(Context
the root context
ctx
,
String
the name as a string
name
,
Object
the object to be bound
val
)

Bind val to name in ctx, and make sure that all intermediate contexts exist.

public static Properties

Returns:

The extracted JNDI specific properties.
extractJndiProperties
(Map<K, V>
The map of config values
configurationValues
)

Given a hodgepodge of properties, extract out the ones relevant for JNDI interaction.

public static InitialContext
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

JndiHelperback to summary
private JndiHelper()

Method Detail

bindback to summary
public static void bind(Context ctx, String name, Object val) throws NamingException

Bind val to name in ctx, and make sure that all intermediate contexts exist.

Parameters
ctx:Context

the root context

name:String

the name as a string

val:Object

the object to be bound

Exceptions
NamingException:
Indicates a problem performing the bind.
extractJndiPropertiesback to summary
public static Properties extractJndiProperties(Map<K, V> configurationValues)

Given a hodgepodge of properties, extract out the ones relevant for JNDI interaction.

Parameters
configurationValues:Map<K, V>

The map of config values

Returns:Properties

The extracted JNDI specific properties.

Annotations
@SuppressWarnings:unchecked
getInitialContextback to summary
public static InitialContext getInitialContext(Properties props) throws NamingException