11.7. Summary

Entity EJBs model persistent objects in the application domain. They are synchronized to a persistent store—usually a database—under the control of the EJB container. The container uses transaction boundaries to determine the correct places to synchronize the EJB and the database. The developer has to pay some attention to transaction attributes, and the way entity EJBs are called from session EJBs, for entity EJBs to perform effectively in practice.

With bean-managed persistence, the EJB’s persistent state is managed by code written by the developer, which will typically consist of JDBC calls to the database. With EJB 1.1-style container-managed persistence, the persistence manager reads and writes the instance variables using ...

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.