May 2001
Intermediate to advanced
1088 pages
30h 13m
English
In Chapter 7, "Creating an Entity Bean," you saw how to create an entity bean that uses BMP (bean-managed persistence) to store the bean in the database. BMP gives you direct control over the storage of the bean and you can handle any odd database relationships just by writing additional SQL code. If you create a lot of entity beans, it doesn't take long for you to get tired of writing SQL code. It's boring, repetitive, and error-prone.
Container-managed persistence (CMP) eliminates a lot of the unpleasantness of entity bean coding by handling the database operations for you. You don't need to write any SQL code (with the possible exception of the WHERE clauses for the finder methods). Aside from freeing ...
Read now
Unlock full access