O'Reilly logo

EJB 3.1 Cookbook by Richard M. Reese

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

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

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