Connecting EJBs to Presentation Tier Components

Design patterns provide useful abstractions to help guide the development process. These patterns represent proven solutions for recurring problems. One pattern that has proven useful in the development of EJB solutions is the session facade design pattern. Using this design pattern, the EJB session bean provides a layer of control between the objects it works with and the client code accessing it. The EJB client invokes the session bean and submits requests. The session bean is responsible for gathering any resources needed, using various helper objects. The facade object also plays a controller role, managing the workflow and formatting the results to return to the client. See Figure 26-1.

Figure ...

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.