Download PDF Home History |  | API Search Feedback FAQ

> ## Overview of the RosterApp Application

> The `RosterApp` application maintains the team rosters for players in sports leagues. The application has five components. The `RosterAppClient` component is a application client that accesses the `RosterBean` session bean through the bean's remote interfaces. `RosterBean` accesses three entity beans--`PlayerBean`, `TeamBean`, and `LeagueBean`--through their local interfaces.

> The entity beans use container-managed persistence and relationships. The `TeamBean` and `PlayerBean` entity beans have a bidirectional, many-to-many relationship. In a bidirectional relationship, each bean has a relationship field whose value identifies the related bean instance. The multiplicity of the `TeamBean-PlayerBean` relationship is many-to-many: Players who participate in more than one sport belong to multiple teams, and each team has multiple players. The `LeagueBean` and `TeamBean` entity beans also have a bidirectional relationship, but the multiplicity is one-to-many: A league has many teams, but a team can belong to only one league.

> Figure 27-1 shows the components and relationships of the `RosterApp` application. The dotted lines represent the access gained through invocations of the JNDI `lookup` method. The solid lines represent the container-managed relationships.

> Figure 27-1 `RosterApp` J2EE Application

Download PDF Home History |  | API Search Feedback FAQ

All of the material in The J2EE(TM) 1.4 Tutorial is copyright-protected and may not be published in other works without express written permission from Sun Microsystems.