A brief history on the evolution of CMP 2.0

image with no caption

Beginning with version 1.1 of the EJB spec, you could use both container-managed persistence (CMP) and bean-managed persistence(BMP). At the highest level, the difference between CMP and BMP is about who writes the database access code.

With EJB 2.0, you can still use both, but there’s now very little reason to ever use BMP. The original EJB 1.1 specification for CMP entity beans was, um, weak. Clunky. Inefficient. Limited. Not That Good. And although many vendors were able to overcome many of the problems with CMP 1.1, the solutions were outside the specification, so your choice as bean developer was to use standard CMP but keep your portability, or step outside the spec (reducing your portability), but get better performance and features.

When the EJB 2.0 spec was created, the team spent a great deal of time and effort talking to both end-user customers (bean developers) and container vendors, all of whom were very happy to describe the problems with CMP. In graphic detail, complete with suggestions for Sun on, “I’ll tell you what you can DO with your CMP bean spec...”

The EJB spec team listened. And designed. And listened. And designed. And in the end, they came up with something awful. A solution that was an equal-opportunity pisser-offer. Vendors hated it. Developers hated it. People like us who had to explain the new technology to customers ...

Get Head First EJB now with O’Reilly online learning.

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