We have mentioned the term binding several times in this chapter. Although there is a Binding class in the JNDI API, you deal most often with something called a Context. A Context plays a central role in JNDI. It is used to bind, unbind, and locate objects that have been associated with a name in JNDI. The Context is represented by the javax.naming.Context interface. This interface has the necessary methods to put objects into the naming service and also to locate them. Table 4.2 lists the most commonly used methods from the Context interface when dealing with EJB.
|Object||lookup(String name)||Returns the object ...|