Exercise

To extend your knowledge of the Message-driven beans, try the following exercise.

  1. Extend the Agency case study. Add a Message-driven bean that receives a message from the AdvertiseJob Session bean when a new job is advertised. The Message-driven bean should search through all the applicants to find those suitable to be considered for the job. To be considered for a job, the applicant must match the job's:

    • Location

    • At least one skill

    If the applicant has all the required skills set exactMatch to true; otherwise, false.

    All applicants that match at least one skill must be added to the Matched table.

    Don't forget to create a JMS queue for the messages (you can't use the same queue as the one used in the Applicant example).

    Add some new jobs and ...

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