Enterprise JavaBeans™ Component Architecture: Designing and Coding Enterprise Applications
by Gail Anderson, Paul Anderson
8.4. Student Message-Driven Bean
Now let's move to an example that uses both publish/subscribe and point-to-point messaging. The example is a Student message-driven bean responding to topic messages broadcast from a School client. The idea is that the School publishes a list of new course topics to students who wish to be notified. Each new course has a name, course code, and price. Suppose a student who is interested in a new course uses a JSP program to “sign up” by recording his or her name and e-mail address in a database. When the School publishes a list of new courses, the Student bean checks the price of each course. If it's affordable, the Student bean reads the database and sends e-mail to each student with the new course information. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access