6.2. Customer Entity Bean
Entity beans can be more difficult to understand than session beans because the EJB container does more work behind the scenes. Therefore, as we present our example Customer EJB, we'll show you the entity bean code and explain the services that the EJB container provides.
The Big Picture
Our entity bean example consists of a Customer EJB with Bean-Managed Persistence (BMP). It provides persistence for the CustomerVO data we used in the previous chapter (see Listing 5.1 on page 143). With this capability, our J2EE shopping application can now identify customers from a database (and verify a customer's password), or create a new customer. We thus provide a true “login” process. The CustomerVO object includes a customer's ...
Get Enterprise JavaBeans™ Component Architecture: Designing and Coding Enterprise Applications 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.