Creating CMP Entity Beans

In this section, we create a CMP version of the Doctor Entity bean from the last section. This approach illustrates the differences between BMP and CMP from a coding standpoint.

Creating the Home Interface

The Home interface does not change from BMP to CMP. The clients of the Entity bean use the same creation and finder methods from the Home interface.

Creating the Value Object

The same DoctorVO class from the BMP example is used with this CMP example. The value object for BMP does not need to be any different that the one used for CMP.

Creating the Remote Interface

Just like the Home interface, EJB clients use the same remote methods, individual getters/setters, and bulk getters/setters.

Creating the Bean Class

This ...

Get BEA WebLogic Server™ 8.1 Unleashed 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.