Getting Started with Enterprise JavaBeans™

G

Entity Beans

Tutorial Home Section Home Previous Section Next

Get

Get

Handling Life Cycle Methods Under CMP

     Just as with BMP, CMP entity beans must respond appropriately in life cycle methods; however, due to the container's management of persistence, the timing and responses are often different. We saw in Entity Beans with Container-Managed Persistence that a CMP bean class must be declared abstract. As with BMP, the class must provide a public, no-arg constructor. The sequence of events (see The Entity Bean Life Cycle) is also the same.

     Let's take a look at how the methods (first described in Entity Beans with Bean-Managed Persistence) work when using CMP:



Tutorial Home Section Home Previous Section Next