Java Reference
In-Depth Information
21.3.2.4
Novell, the folks behind Netware, came up with NDS, which provides full di-
rectory services like LDAP/X.500, but (according to the computer press—let
us confess right now that we have never directly used NDS or Microsoft's Ac-
tive Directory) with a simpler API and easier administration. We don't know
enough about it to comment on it. But we do know that JNDI can access it.
Novell Directory Service (NDS)
21.3.2.5
We have to do the same hand-waving here. Active Directory provides similar
functionality to NDS and LDAP. We don't know enough about it to comment
on it. But, again, JNDI can talk to it.
Microsoft's Active Directory
21.3.3
The Java Naming and Directory Interface package is designed to provide a
common way to access all of these disparate naming and directory services.
The JNDI architecture consists of the JNDI API, which provides a consis-
tent API, and a Service Provider Interface (SPI), which requires an instance
to connect to each naming service (such as DNS, LDAP, the RMI registry,
and so on).
Basic naming system functionality is obtained through the javax.naming
package. Directory services are provided by the javax.naming.directory
package.
Since JNDI can span multiple naming and directory systems, there are no
absolute root contexts, so the InitialContext class exists to provide a base
from which all other names and directories may be looked up.
Putting a Face to a Name: JNDI
21.3.3.1
The next couple of sections describe a very simple JNDI application that uses
the DNS Service Provider Interface to do directory operations on a DNS
domain. The source code for the class is shown in Example 21.1.
A Sample JNDI Program
Search WWH ::




Custom Search