O'Reilly logo

J2EE™ Tutorial, The by Beth Stearns, Monica Pawlan, Eric Jendrock, Kim Haase, Dale Green, Stephanie Bodoff

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The PlayerEJB Code

The PlayerEJB entity bean represents a player in a sports league. Like any entity bean with container-managed persistence, PlayerEJB needs the following code:

  • Entity bean class (PlayerBean)

  • Local home interface (LocalPlayerHome)

  • Local interface (LocalPlayer)

The source code for this example is in the j2eetutorial/examples/src/ejb/cmproster directory. To compile the code, go to the j2eetutorial/examples directory and type ant cmproster.Asample RosterApp.ear file is in the j2eetutorial/examples/ears directory.

Entity Bean Class

For container-managed persistence, the code of the entity bean class must meet the syntax requirements. First, the class must be defined as public and abstract. Also, the class must implement the following: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required