The J2EETM Tutorial
Home
TOC
Index
PREV TOP NEXT Search
Feedback

Bean-Managed Persistence Examples

Dale Green

Data is at the heart of most business applications. In J2EE applications, entity beans represent the business objects that are stored in a database. For entity beans with bean-managed persistence, you must write the code for the database access calls. Although writing this code is an additional responsibility, you will have more control over how the entity bean accesses a database.

This chapter discusses the coding techniques for entity beans with bean-managed persistence. For conceptual information on entity beans, please see What Is an Entity Bean?.

In This Chapter

The SavingsAccountEJB Example
Entity Bean Class
Home Interface
Remote Interface
Running the SavingsAccountEJB Example
deploytool Tips for Entity Beans With Bean-Managed Persistence
Mapping Table Relationships for Bean-Managed Persistence
One-to-One Relationships
One-to-Many Relationships
Many-to-Many Relationships
Primary Keys for Bean-Managed Persistence
The Primary Key Class
Primary Keys in the Entity Bean Class
Getting the Primary Key
Handling Exceptions
Home
TOC
Index
PREV TOP NEXT Search
Feedback