Introduction to CMRs

Objects do not exist in a vacuum: Designs specify relationships between a system's objects. For instance, the StudentBean would naturally have a relationship with a SchoolBean. With the EJB 2.0 specification, there is standard support for relationships between entity beans. In EJB 2.0, the container handles the persistence logic necessary to manage the relationship between EJB 2.0 CMP beans (see Figure 9-1).

Figure 9-1. CMRs with the Student EJB

Container-managed entity beans may use one-to-one (1:1), one-to-many (1:N), or many-to-many (N:N) relationships. A StudentBean and a LockerBean might have a one-to-one relationship. ...

Get J2EE™ Applications and BEA™ WebLogic Server™ now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.