Enterprise JavaBeans™ Component Architecture: Designing and Coding Enterprise Applications
by Gail Anderson, Paul Anderson
6.1. Introducing Entity Beans
Our example entity bean models the customer data for the Music Collection shopping application. We'll delay describing it until after we've characterized entity beans in general.
An entity bean is an in-memory representation of persistent data. The persistence mechanism is either coded by the bean developer (bean-managed persistence) or provided by the container (container-managed persistence). For both bean-managed and container-managed entity beans, the EJB container manages life cycles and keeps the beans synchronized with the underlying database. Because multiple clients may share an entity bean (and possibly alter its state), the container and the bean developer must make sure that any updates occur within an ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access