Bean-Managed Persistence and Container-Managed Persistence—A Comparison

Implementing BMP is the responsibility of the bean provider. The container provider provides the database persistence functionality for entity beans in CMP.

The bean provider has to define the SQL queries for only the finder methods and business methods of the entity bean. Tools provided by the container provider aid the bean provider in implementing the actual database functionality for container-managed persistence in entity beans, thus making CMP a lot simpler and easier to use. On the other hand, in BMP the bean provider has a lot more tasks to perform, such as writing the SQL queries as well as the JDBC code in the entity bean to access the database. This makes using ...

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.