JNDI FAQ  «Prev  Next»
  1. Who should use JNDI?
    Answer: Any Java application that needs to access information about users, machines, networks, and services. User information includes security credentials, phone numbers, electronic and postal mail addresses, and application preferences. Machine information includes network addresses, machine configurations, etc. In addition, any Java application that needs to either export objects or access objects exported by other applications and services. Examples include printers, calendars, and networked file systems.
  2. Describe what JNDI is?
    Answer: JNDI is a generic directory API for Java programs. It is analogous to the java.io.File class for accessing files.
    There might be some administrative programs that need to manipulate a file at the protocol level (such as NFS), but typically all Java applications use the File class to access to file system.
    Similarly, most Java programs should use JNDI to access directories.
    Applications that need to manipulate directory content at the protocol level may choose to use Netscape's API.
  3. Where is JNDI being used in the Java platform?
    Answer: HotJava Views 1.1 is using JNDI to access LDAP.
    Enterprise APIs such as
    1. Enterprise JavaBeans
    2. Java Message Service
    3. JDBC 2.0
    make use of JNDI to for their naming and directory needs.
    RMI over IIOP applications can use JNDI to access the CORBA (COS) naming service.
  4. Who will provide implementations of JNDI?
    At the time of this writing, IBM, Novell, Sun, and WebLogic have produced service providers for JNDI.
  5. What protocols does JNDI provide an interface to?
    Answer: JNDI itself is independent of any specific directory access protocol. Individual service providers determine the protocols to support.
    There will be provider implementations for popular protocols, such as LDAP, NDS, DNS, and NIS(YP), supplied by different vendors.

  1. How does JNDI relate to LDAP?
    Answer: JNDI provides an excellent object-oriented abstraction of directory and naming.
    Developers using JNDI can produce queries that use LDAP or other access protocols to retrieve results; however, they are not limited to LDAP nor do they have to develop their applications wired to LDAP. JNDI supports the key capabilities in LDAP v3.
  2. How does JNDI relate to Netscape's Java LDAP API?
    Answer: Netscape's API is LDAP-specific. It is used for low-level access to LDAP directories. It exposes details about the protocol that applications typically do not need to know.
  3. How does JNDI relate to OMG's CORBA standards for naming?
    A Java CORBA application can use JNDI to access to the CORBA (COS) name service, as well as other naming and directory services.
    It offers the application one interface for accessing all these naming and directory services.
    Using JNDI also paves the way for Java CORBA applications to use a distributed enterprise-level service like LDAP to store object references.
  4. 9. How does JNDI relate to Microsoft's ADSI?
    The Java ADSI package allows Java programs to access Active Directory based on the COM model.
    Although it can be used to access other directories, it is a Windows-centric solution.
    JNDI offers Java applications, regardless of whether they're running on Windows or accessing Active Directory, to access directories using the Java object model.
    For example, you can manipulate objects such as AWT and JavaBeans components, bind them into the directory, and look them back up without having to do any translation or deal with data representation issues.
  5. 10 What is XFN and how does this relate to JNDI?
    XFN is X/Open Federated Naming, a C-based standard for accessing multiple, possibly federated naming and directory services.
    A programmer familiar with XFN will find it easy to use JNDI.
    11. What about security?
    Different directories have different ways of dealing with security.
    JNDI allows for applications to work in conjunction with directory-specific security systems. In the future, JNDI-based applications will be able to take advantage of any single sign-on mechanism developed for the Java platform.