JNDI API

The main JNDI API package is the javax.naming package, which contains one key class, InitialContext, and two key interfaces, Context and Name.

In using JNDI, a client first establishes a connection to the JNDI service (sometimes called the JNDI tree). After the client is connected, a context is created to facilitate the access to system components and resources. Context is a fundamental concept in the JNDI model. A context is a set of name-to-object bindings within a naming service that all share the same naming convention.

All naming operations in JNDI are performed within a context. Therefore, establishing a context is the initial step prior to any operation. The javax.naming.InitialContext class implements the javax.naming.Context ...

Get Sams Teach Yourself EJB in 21 Days 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.