6.3. Entity Bean Test Client

Before integrating the Customer EJB into our Music Collection application, let's test it with an independent Java test client. The test client also helps show the role that the EJB container plays in managing entity beans. We've loaded several test records into our Customers database table (by accessing the database directly). Table 6.3 shows the initial test data.

Table 6.3. Initial Database Values for Customers Table
Customer ID Name Password Email Orders Pending
101 Catherine Password101 cm@asgteach.com false
102 Maheu Password102 mh@asgteach.com true
103 Cecile Password103 cc@asgteach.com false
104 Chaval Password104 cv@asgteach.com true
105 Levaque Password105 lv@asgteach.com true

Listing 6.15 shows the source ...

Get Enterprise JavaBeans™ Component Architecture: Designing and Coding Enterprise Applications now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.