After the initial JNDI context has been obtained, a program can look up existing objects and bind new objects to the context.
When working with EJBs, the main JNDI activity is to look up existing bound objects; the J2EE server does most of the binding of the objects automatically.
Because this section discusses the binding of objects, you can skip it if your primary purpose for using JNDI is to obtain EJB and other references within a J2EE application.
Binding an object means adding a name to the JNDI service and associating that name with a Java object. The name and object are bound to a context. Listing 3.1 shows how a text message can be bound to the name sams/book.