Method Invocations in RosterApp

To show how the various components interact, this section describes the sequence of method invocations that occur for particular functions. The source code for the components is in the <INSTALL>/j2eetutorial14/examples/ejb/cmproster directory.

Creating a Player

1. RosterClient

The RosterClient invokes the createPlayer business method of the RosterBean session bean to create a new player. In the following line of code, the type of the myRoster object is Roster, the remote interface of RosterBean. The argument of the createPlayer method is a PlayerDetails object, which encapsulates information about a particular player.

myRoster.createPlayer(new PlayerDetails("P1", "Phil Jones",
  "goalkeeper", 100.00));
2. RosterBean ...

Get The J2EE™ Tutorial Second 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.