View RSS Feed

JNDI

Java Naming and Directory Interface (JNDI) tutorials and examples.

  1. Using the JNDI InitialContext Class

    by , 07-07-2012 at 05:10 PM
    Context interface is implemented by Class javax.naming.InitialContext and is considered as enterance point in a naming system. InitialContextobject shall be created first for using JNDI so that objects could be accessed. Set of properties are taken by the InitialContext constructor in a form like java.util.Hashtable and other subclasses, like a Properties object. In lookup e.g, InitialContext is created as following:

    Java Code:
    Properties props = new Properties();
    props.put(Context.INITIAL_CONTEXT_FACTORY,
    ...