O'Reilly logo

Sams Teach Yourself J2EE™ in 21 Days by Peter Roxburgh, Andy Longshaw, Debbie Law, Dan Haywood, Martin Bond

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required