Exercises

The Agency case study defines a complete set of Session beans and Entity beans. All of the Entity beans, except the Applicant bean, are implemented using CMP; the Applicant bean has been left using BMP. Today's exercise is to refactor the Applicant Entity bean to use CMP. The source code and deployment descriptors can be found under the exercise directory in Day 7 on the Web site; the directory structure is the same as yesterday.

In more detail, the fields of the Applicant bean need to be converted into either CMP or CMR fields:

  • login This is the primary key for the Applicant Entity bean and will be a CMP field.

  • name CMP field.

  • email CMP field.

  • summary CMP field.

  • location CMR field to the Location bean. There will be a many-to-one ...

Get Sams Teach Yourself J2EE™ in 21 Days, Second Edition 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.