21.2. Writing an Entity Bean

Session beans introduced the idea that the interface was actually implemented in a generated code layer, rather than in our implementation class. But we could draw a direct line from each interface method to our implementing method. In entity beans, the relationships become fuzzier; we're relying on the container more than in any other architecture we've seen.

Table 21.1. Components in the Entity EJB Application
New Components
Name Package Class or Interface Comment
GameHome nfl.application.ejb Interface The Remote Home interface.
GameRemote nfl.application.ejb Interface The Remote interface.
GameEntityBean nfl.application.ejb Interface The bean implementation.
GamePK nfl.application.ejb Interface Primary key for the ...

Get J2EE™ and JAX™: Developing Web Applications and Web Services 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.