Locating EJB Objects

Up to this point, we have stayed away from talking specifically about how JNDI and EJB are used together. This was done intentionally so that you can have time to understand the JNDI concepts without being clouded by the EJB aspects of it. However, it’s now appropriate to introduce how a client uses JNDI to locate enterprise beans. Even though we haven’t fully discussed the details of enterprise beans, the procedure is pretty much the same regardless of whether it’s an entity or session bean.

Note

Remember, the message-driven bean is not exposed to the client. So, you will not be able to perform a lookup and obtain a reference to a message-driven bean.

You learned in Chapter 3, “EJB Concepts,” that each enterprise bean that ...

Get Special Edition Using Enterprise JavaBeans™ 2.0 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.