The J2EETM Tutorial
Home
TOC
PREV TOC NEXT Search
Feedback

Entity Beans

by Dale Green

An entity bean represents an entity kept in a persistent storage mechanism, usually a database. A business application, for example, might use a database to store business entity objects such as accounts, customers, orders, and products. Inside the J2EE server, this application would represent the business entity objects with entity beans.

Characteristics of Entity Beans
Persistence
Shared Access
Primary Key
A Bean-Managed Persistence Example
Entity Bean Class
The EntityBean Interface
Home Interface
Remote Interface
Tips for Running the AccountEJB Example
Mapping Table Relationships For Bean-Managed Persistence
One-to-One Relationships
One-to-Many Relationships
Many-to-Many Relationships
About Container-Managed Persistence
A Container-Managed Persistence Example
Primary Key Class
Creating a Primary Key Class
Class Requirements
Bean-Managed Persistence and the Primary Key Class
Container-Managed Persistence and the Primary Key Class
Getting the Primary Key
Handling Exceptions
The Life Cycle of an Entity Bean

Home
TOC
PREV TOC NEXT Search
Feedback