Chapter 21. Entity Beans
Our final topic in the book is the use of entity beans. Entity EJBs represent persistent data, which most commonly resides in an SQL database that will be accessed via JDBC. This is not a requirement by any means—the data could reside in any file structure the developer chooses—but most EJB container providers provide tools and utilities that greatly simplify the use of the most common data sources, while supporting something more esoteric is left completely to the developer.
In our example application, we have two candidates for making entity beans; the Team class and the Game class. We don't dynamically create new teams during the year, and although the data for a team changes, the changes do not really need to be persisted—as ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access