May 2004
Beginner to intermediate
1032 pages
23h 48m
English
Now, you will build a simple bulletin board application. For this example, the bulletin board publisher program will generate 10 simple messages. The subscriber will be a Swing application that will display the messages as they arrive.
The bulletin board uses a topic called jms/bulletinBoard created along with the other JMS resources at the start of today's examples.
The same mechanism is used to create a topic as you used to create a queue, so Listing 9.4 should appear very similar to the previous point-to-point sender example.
import javax.jms.*; public class BBPublisher { private Connection connection; private Session session; ... |
Read now
Unlock full access