11.2. Principle of operation

11.2.1. Overview

Consider this problem: An entity EJB is required to model an object that is actually represented as rows of a large database table (let’s suppose it has a million rows). It would be conceptually simple for the container to instantiate the EJB implementation class for each row in the table. Then there would be a one-to-one mapping between rows and EJB implementation instances. When a client wanted to make use of the EJB that represented a particular element of data, it could just be given a reference to the EJB instance that contained the data itself. This strategy is simple, but inadequate [2] for two main reasons.

[2] Although rarely useful in practice, synchronization by exclusive locking of data ...

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.