Exercises

Today's exercise is to extend the JAX-RPC front end for the Agency case study so that a client can find all the applicants at a specific location. In the exercise directory under Day 20 on the accompanying Web site there is a version of the Agency case you have seen in this chapter. Your task is to add to the Service EJB a method that takes the name of a location and returns an array of strings representing the applicants registered at that location.

The provided files consist of the stateless session bean discussed in this chapter (Service) that allows you to list all the jobs at a particular location.

If you need a few pointers, you should:

  1. Update the Service.java and ServiceImplementation.java files in day20/exercise/src/agency. You can get a list of applications for a location using the findByLocation method on the ApplicantHome interface.

  2. Build the classes using asant build-service.

  3. Open the ear file created in the build folder and add to the Service EJB an ejb reference for the applicant home interface.

  4. Verify and deploy your EAR to your J2EE RI application server (using deploytool or asant deploy-service).

  5. Update the AgencyServiceClient.java file in day20/exercise/src/client to call your new method.

  6. Build the client using asant build-client and then run it with asant run-client.

A complete solution can be found in the agency folder on the Day 20 folder on the accompanying Web site.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.7.208