Developing the customer and transaction record EJBs

In this section, we develop the customer and transaction record CMP entity beans.

Customer EJB

Table 11-2 shows the attributes of the customer bean. To illustrate that an entity bean can have a local and a remote interface, we will implement both.

Table 11-2. List of CMP fields for the customer bean
AttributeTypeKey fieldLocal interfaceRemote interface
customerIDintYes-----
firstNamejava.lang.StringNoYesYes
lastNamejava.lang.StringNoYesYes
titlejava.lang.StringNoYesYes
userIDjava.lang.StringNoYesYes
passwordjava.lang.StringNoYesYes
addressitso.bank5.beans.AddressNoYesYes

Notice the address attribute; it refers to a JavaBean that holds the detailed address information. We will map this attribute to ...

Get EJB 2.0 Development with WebSphere Studio Application Developer 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.