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.
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: ...