org.compass.core.jndi
Class NamingHelper

java.lang.Object
  extended by org.compass.core.jndi.NamingHelper

public abstract class NamingHelper
extends Object


Constructor Summary
NamingHelper()
           
 
Method Summary
static void bind(Context ctx, String name, Object val)
          Bind val to name in ctx, and make sure that all intermediate contexts exist.
static InitialContext getInitialContext(CompassSettings settings)
           
static Properties getJndiProperties(CompassSettings settings)
          Transform JNDI properties passed in the form compass.jndi.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NamingHelper

public NamingHelper()
Method Detail

getInitialContext

public static InitialContext getInitialContext(CompassSettings settings)
                                        throws NamingException
Throws:
NamingException

bind

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 - the root context
name - the name as a string
val - the object to be bound
Throws:
NamingException

getJndiProperties

public static Properties getJndiProperties(CompassSettings settings)
Transform JNDI properties passed in the form compass.jndi. [vaules] to the format accepted by InitialContext by triming the leading "compass.jndi".



Copyright (c) 2004-2009 The Compass Project.