Container Managed Persistence

The term container-managed persistence (CMP) applies to the relationship between an EJB and its container. It means that the EJB container handles all database access required by the entity bean. The bean's code contains no database access (SQL) calls. As a result, the bean's code is not tied to a specific persistent storage mechanism (database). Because of this flexibility, even if you redeploy the same entity bean on different J2EE servers that use different databases, you won't need to modify or recompile the bean's code. In short, your entity beans are more portable.

The IDE provides facilities to create and manage the mappings between the CMP beans and the Sun ONE Application Server.

See also

Mapping Relational Databases to OO Models

Properties of a CMP Bean


Legal Notices