The PlayerBean Code
The PlayerBean entity bean represents a player in a sports league. Like any local entity bean with container-managed persistence, PlayerBean needs the following code:
Entity bean class (PlayerBean)
Local home interface (LocalPlayerHome)
Local interface (LocalPlayer)
The source code for this example is in the <INSTALL>/j2eetutorial14/examples/ejb/cmproster directory.
Entity Bean Class
The code of the entity bean class must meet the container-managed persistence syntax requirements. First, the class must be defined as public and abstract. Second, the class must implement the following:
The EntityBean interface
Zero or more ejbCreate and ejbPostCreate methods
The get and set access methods, defined as abstract, for the persistent ...
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.