13.3. The EJB 2.0 CMP philosophy

Before discussing the development of 2.0-compliant entity EJBs, we need to spend a little time examining what is wrong with the 1.1 scheme. At first glance, EJB 2.0 CMP appears extremely complex. Understanding the limitations of the 1.1 scheme should make it easier to see why this complexity is necessary, and why it might ultimately be to the advantage of the developer to come to grips with it.

13.3.1. Issues with 1.1-style CMP

Issue 1: application logic and schema mapping are entangled

A 1.1-style entity EJB will often contain very little code (less than 20 lines in some cases). All the work (synchronizing to the database) gets done in vendor-supplied classes, usually generated at deployment time. This is ...

Get Applied Enterprise JavaBeans™ Technology 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.