Container-Managed Persistence

CMP means that the EJB container is responsible for implementing the persistence functionality of the entity bean. The state of the bean and the data in the database are maintained in sync by the EJB container. The EJB container determines when to refresh the entity bean contents with data in the database and when to refresh the data in the database with the contents of the entity bean. The bean provider is freed up from incorporating this persistence functionality, that is, having to write the SQL queries to either retrieve, insert, update, or delete data in the database.

How does the EJB container know which database tables to go against to generate the SQL queries to persist or retrieve the data?

Because entity ...

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.