Overview of Container-Managed Persistence

The EJB specification provides for two different ways of implementing Entity beans. The first approach, covered yesterday, is for the bean provider to embed the persistence logic within the bean itself—hence the name bean-managed persistence or BMP. The second is for the container vendor to provide that logic, either generated by the EJB container vendor's deployment tools or as part of the EJB container itself. Entity beans built this way are called CMP Entity beans.


CMP Entity beans have always been part of the EJB specification, first in EJB 1.0 and then with some minor refinements in EJB 1.1. There were substantial changes to CMP Entity beans in EJB 2—so substantial, in fact, that CMP 1.1 Entity ...

Get Sams Teach Yourself J2EE™ in 21 Days, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.