BMP Entity Beans

The EJB specification also supports entity beans with BMP. Unlike CMP entity beans that rely on the EJB container to provide the persistence logic, BMP entity beans must write explicit code to access the persistent store. For most users, this involves writing JDBC code to access a relational database.

Writing the Student BMP Entity EJB

The following sections demonstrate the process for creating an entity bean with BMP. In this example, we model a Student as an entity bean. This entity bean could be used to model Student records and make them available to Teachers and Parents.

First, create the remote interface, which extends javax.ejb.EJBObject and provides the signatures for business methods that the Student entity bean exposes ...

Get J2EE™ Applications and BEA™ WebLogic Server™ 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.