7.4. Using JNDI
In this section we discuss the various services that JNDI provides to its clients.
7.4.1. Basic JNDI lookups
In an EJB client (and, indeed, any JNDI client) the starting point for name resolution is to instantiate an InitialContext. This object does not necessarily do any work itself; normally, it delegates to the vendor-specific naming context class via the service-provider interface. This vendor-specific class acts as a driver for the underlying directory server, and will implement the functionality required to communicate with it over a network, if necessary. In many cases, the vendor’s class will supply objects directly—without a network operation—but this is transparent to the developer.
Having created an InitialContext ...
Get Applied Enterprise JavaBeans™ Technology now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.