Using MDB in a publish-and-subscribe application

The publish-and-subscribe architecture can be useful in keeping track of the availability of individuals. In this recipe, we will develop an application that uses a topic to monitor and record when a person is available. That is, when a person is at his/her desk, logged on to a computer or otherwise able to respond to requests.

Getting ready

A topic is similar to a queue. Messages are sent to a topic just as they are sent to a queue. However, once there they may be accessed by more than one consumer. The essential structure of a servlet used to generate a message was introduced in the introduction. Here we will address the unique elements of creating and using a topic to support a publish-and-subscribe ...

Get EJB 3.1 Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.