Chapter 7. Naming and JNDI

Overview

While previous chapters have shown in outline how EJBs and their clients use JNDI to find home interfaces, this chapter describes the JNDI system in more detail. We start with an outline of the JNDI architecture, and describe some of the key terms and concepts used in JNDI programming. This is followed by a description of the use of JNDI by EJBs and their clients, including the distinction between the server-wide namespace and the ‘local’ namespace provided for each EJB. This will lead to a discussion of the use of the ‘java:comp/env’ prefix in name lookups; this is an issue about which many developers and, sadly, some container vendors are unclear. Finally, to provide a detailed description of the JNDI architecture, ...

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.