Bean-Managed Persistence Concepts

In container-managed persistence (CMP), as you saw yesterday, the EJB container provider supplies tools that help automate the generation of code required for the entity bean to interact with the database. Bean-managed persistence (BMP) is the other technique used to persist the state of entity beans. In BMP the entity bean itself is responsible for maintaining its state, hence the name. The entity bean has all the functionality built into it for connecting to the database, inserting data in the database, retrieving data from the database, updating data in the database, and so on.

The entity bean uses the life-cycle methods invoked by the EJB container at different points in time to interact with the data. For ...

Get Sams Teach Yourself BEA WebLogic Server 7.0™ in 21 Days 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.