Summary

Today you wrote a container-managed persistence enterprise bean. The container is responsible for generating the database access code. Similar to BMP, the CMP contains the home interface, the component interface, the bean class, and the deployment descriptor. The bean class contains the abstract accessor methods for persistent fields and implements the callback methods and home methods. The bean class may contain select methods, which are query methods used within an entity bean instance.

The CMP deployment descriptor contains the abstract persistence schema and EJB QL queries for finder and select methods. At deployment time, the abstract schema is mapped to the database schema allowing the container to generate the required data access ...

Get Sams Teach Yourself EJB 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.