16.5.2 Entity beans
Entity beans are server-side components that represent business objects stored in a persistent storage mechanism. This means, they provide an object view of transactional data in an underlying datastore that can be accessed from multiple, either local or remote, clients.
There are two different types of Entity beans available:
- Container Managed Persistence (CMP) entity beans A Container Managed Persistence (CMP) bean is an entity bean for which the container handles the interactions between the enterprise bean and the data source. The container is responsible for synchronization of instance fields with the persistent store. When you develop a Container Managed Persistence bean, the application is insulated from the details of the persistence mechanism.
- Bean Managed Persistence (BMP) entity beans A Bean Managed Persistence (BMP) entity bean, is simply an entity EJB where the developer manually implements the service methods to manage persistence, most notably ejbLoad() to load the persistent state from the backing store and ejbStore() to store it.