Developing a BMP entity bean

In this section, we develop a CustomerInfoBmp bean to illustrate the use of BMP.

The CustomerInfoBmp bean represents additional information for a customer of the bank. For each kind of additional information, we create a row in a CUSTOMERINFO table. Additional information could be a photo for printing on the credit card or a scanned image for the identification card.

Underlying table for customer information

Table 13-1 shows the layout of the CUSTOMERINFO table.

Table 13-1. Customer information table
Column nameTypeLengthKeyNullsDescription
CUSTOMERIDINTEGER PKNoCustomer ID
INFOIDINTEGER PKNoInformation ID (1,2,...)
DESCRIPTIONVARCHAR50NoYesDescription of information
DATABLOB10000NoYesBinary data

This design allows for ...

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.