Q&A

Q1:Why is a Name Service so important?
A1: Without JNDI, it would be a lot harder to provide services such as those implemented using J2EE objects like datasources, message queues, and EJBs. Each vendor would choose their own mechanism for defining how a client program should gain access to the J2EE objects. Some might do this by distributing configuration files, others by using TCP/IP broadcast network packets. Using a Name Service provides a consistent means of providing network services in a portable and platform-independent manner. Not only that, you can move an implementation of a service from one machine to another. In this instance, the server simply updates the Name Service entry to reflect its new location, and the whole process is transparent to the client.
Q2:Why is JNDI so large? Surely all I need to do is map a name onto a Java object?
A2: If all you want to do is support J2EE objects, JNDI could be as simple as a name-to-object mapping service. But Sun Microsystems designed JNDI to interoperate with established Directory Services, such as NDS, LDAP, and DNS. By providing Java programming support for these services, the designers of JNDI have ensured it will not be used as a proprietary product with J2EE servers, but as a general interface to fully functional directory services. This design philosophy also provides programmers with a mechanism for developing interfaces to NDS and LDAP in Java rather than some other language, such as C++ or C#.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.136.233.25