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

Entity Bean Basics

As persistent objects, an entity bean's state must be saved to the database. Entity beans have two operational styles: They either use BMP or CMP.

With BMP, the bean writer provides the code to load and persist the entity bean to the database. This usually requires JDBC code in the bean class to read and update the entity bean's fields to the database.

With CMP, the EJB container automatically provides code to persist the entity bean to the database. No JDBC code is required. The programming model for CMP changed drastically between EJB 1.1 and EJB 2.0. The EJB 2.0 CMP model offers a number of additional features for both the bean writer and the EJB container. In this chapter, we discuss only the EJB 2.0 CMP model. While 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