Exercises

There are several refactoring exercises that could be performed on the case study. One of the most effective is to use Value Objects between the clients and their associated Session beans. This exercise asks to you perform such a refactoring.

  1. Starting with the Agency example under the Day 18 exercise, create a Value Object called ApplicantValueObject. This should contain all of the information about an applicant, such as his or her name, email, and so on. The class you create should be a JavaBean, and you must be able to use it as a parameter or return type in an RMI method call.

    Alter the Register interface so that it passes ApplicantValueObjects between client and server. The interface should only have two methods.

    Alter the RegisterBean ...

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.