org.hibernate.search.util.impl
Class JNDIHelper

java.lang.Object
  extended by org.hibernate.search.util.impl.JNDIHelper

public class JNDIHelper
extends Object

Helper class for creating an JNDI InitialContext.

Author:
Hardy Ferentschik

Field Summary
static String HIBERNATE_JNDI_PREFIX
           
 
Method Summary
static InitialContext getInitialContext(Properties properties, String prefix)
          Creates an initial context
static Properties getJndiProperties(Properties properties, String prefix)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HIBERNATE_JNDI_PREFIX

public static final String HIBERNATE_JNDI_PREFIX
See Also:
Constant Field Values
Method Detail

getInitialContext

public static InitialContext getInitialContext(Properties properties,
                                               String prefix)
                                        throws NamingException
Creates an initial context

Parameters:
properties - Configuration properties to check for JNDI specific properties
prefix - The prefix used to designate JDNI properties. If a property from property contains a property which matches the prefix, the prefix gets removed and the property passed to the initial context creation.
Returns:
the initial context
Throws:
NamingException - in case an error occurs creating the InitialContext

getJndiProperties

public static Properties getJndiProperties(Properties properties,
                                           String prefix)


Copyright © 2006-2012 Red Hat Middleware, LLC. All Rights Reserved