Using a Façade Pattern to Hide EJB
Another design pattern that you’ll see used quite often in presentation tiers that have to communicate with a distributed middleware is the Façade pattern. The Façade pattern uses a single object or a small number of objects as a front end to a larger set of interrelated objects. So, suppose you have several session beans in your EJB application that the presentation tier needs to communicate with. Rather than expose the different session beans to the presentation tier, the Façade pattern can be used to present a single interface to the presentation layer and make the component interfaces easier to deal with. The object that implements the Façade pattern can live in the presentation tier or in the application ...
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.