BMP Entity Bean Lifecycle

The lifecycle of both BMP and CMP Entity beans is dictated by the EntityBean interface that the bean must implement. This is shown in Figure 6.4.

Figure 6.4. The javax.ejb.EntityBean interface defines certain life-cycle methods that must be implemented by Entity beans.

However, although the method names are the same, the obligations of BMP versus CMP Entity beans for each of those methods are different. This section discusses just those lifecycle methods for BMP Entity beans. The Job Entity bean from the case study will predominantly be used for example code.

To start with, the Entity bean must implement the javax.ejb.EntityBean ...

Get Sams Teach Yourself J2EE™ in 21 Days 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.