O'Reilly logo

J2EE™ Applications and BEA™ WebLogic Server™ by Sandra L. Emerson, Rob Woollen, Michael Girdley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Session Beans as a Wrapper for Entity Beans

One of the main advantages of modular software is abstraction. An abstract implementation's components communicate through well-defined interfaces, so that any component could be replaced with an alternate module. Entity beans are not fully abstract: Although they expose remote interfaces to clients, their structure is closely tied to the fields in a particular database.

As we have shown, the Web tier uses an EJB layer to interact with the database. If the Web tier manipulates the entity beans directly, encapsulation could be violated because the database schema is exposed through the entity beans to the Web tier. A better design is to place session beans in front of entity beans. In that case, the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required