In this chapter:
Entity beans and their lifecycle
How to write container-managed persistence (CMP) and bean-managed persistence (BMP) entity beans
Useful techniques, optimizations, and patterns for writing entity beans
Best practices for developing and deploying entity beans
Entity Enterprise JavaBeans (EJBs) present an object view of persistent data. The fields in entity beans correspond to underlying data in a persistent store—usually, a relational database. An entity bean's state is transactional. When a client updates fields within a transaction, the updates are only permanent if the transaction commits. When a transaction rolls back, the entity bean's state returns to its last committed state. Later in this chapter, we ...