Context Operations

After a client connects to the JNDI service and obtains a JNDI context using InitialContext(), it can apply any of the interface methods. The main operations of the javax.naming.Context interface are the use of bind() to add an entry, rebind() to replace an entry name, lookup() to find or locate an object, and unbind() to delete an entry. Figure 4.3 illustrates these operations. Logically, the server is the application that performs the binding, unbinding, and rebinding operations. Clients perform the lookup of objects by providing the name.

Figure 4.3. JNDI context operations.

The next sections give more details about the

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.