More Details About Entity Beans

Although you have seen what it takes to implement an entity bean, some of the aspects of the entity bean might not seem so obvious. Some of the things you have already seen are important enough to bear repeating. After you understand the major parts of an entity bean, you begin to see how the EJB container uses the bean to load and store database information.

The EntityBean Interface

Every entity bean must implement the EntityBean interface. This interface controls the lifecycle of the bean—creation, updates, and removal. The EJB container uses these methods to tell the entity bean what is going on, and the entity bean must respond appropriately.


An EntityContext object contains information about ...

Get Special Edition Using Java™ 2 Enterprise Edition 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.