Summary

This chapter provided examples of a number of different EJBs. The session bean, the entity bean, and the message-driven bean were all explained with programming examples.

We saw how a session bean can be used to implement a session facade pattern—an object which is responsible for controlling access to other objects. An how an entity bean is used to encapsulate access to data resources. We demonstrated the use of a DAO with an entity bean, allowing the lower level details of data access to be managed by the DAO and allowing the entity bean to provide transactional and life cycle services through the EJB container.

MDBs allow the J2EE application server to provide messaging services in the context of an EJB. As we saw in this chapter, ...

Get J2EE™ and Beyond: Design, Develop, and Deploy World-Class Java™ Software 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.