This content has been marked as final. Show 2 replies
Read the "about JNDI" pages on Sun.
Anyway, JNDI is just the extension API for Java-based programming access to local and remote network information servers (NIS). The "service" is actually a server that provides protocol access to multiple hosted services.
LDAP, ActiveDirectory, etc. are all NIS servers. However, without having to know the exacts of each of these servers, a client using JNDI can "query" the machine for information. In fact, a file system is an information service itself.
I could query an MS server for "guest" and be returned an LDAP entry for the user, or a MSX e-mail address, or some the file or folder on the hard drive with that name, etc.
I don't need access or knowledge of each server - LDAP, Microsoft Exchange, the local file system (i.e. NTFS, FAT, etc), I just query the service and it comes back.
NIS servers are basically just a shell that allows for one protocol to access the information contained by many other services that use many different protocols.
So yes, Question 1: Any organization, business, person that sells a POP3 e-mail server, an LDAP directory server, various 'directory' servers, etc. all provide NIS Servers that can be queried by an NIS service.
Q2: When the JVM starts, JNDI service is setup, and if properly configured, can connect to LDAP, ActiveDirectory, etc. When the JVM shutsdown, the NDI service shutsdown.
Bzzt WTJ wrong again, wot a surprise. JNDI is not a server and it is not started or shut-down by the JVM. It is an API.
@OP: JNDI is now built into the JDK since 1.4 I think. There are various 'service providers', e.g. Novell, and the ones you've mentioned.