A brief history on the evolution of CMP 2.0
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 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.