O'Reilly Book
Excerpts: Java Message Service
Developing a Simple JMS Example
by David A. Chappell
This excerpt is Chapter 2 from Java Message Service, published in December 2000 by O'Reilly.
Now that you understand Message-Oriented Middleware and some JMS concepts, you are ready to write your first JMS application. This chapter provides a gentle introduction to JMS using the publish-and-subscribe messaging model. You will get your feet wet with JMS and learn some of the basic classes and interfaces. Chapter 4, Publish-and-Subscribe Messaging, covers publish-and-subscribe in detail, and Chapter 5, Point-to-Point Messaging, covers the point-to-point message model.
As with all examples in this book, example code and instructions specific to several vendors is provided in the book download at O'Reilly's web site. You will need to install and configure your JMS provider according to the instructions provided by your vendor.
The Chat Application
Getting Started with the Chat Example
Examining the Source Code
Bootstrapping the JMS client
Obtaining a JNDI connection
The TopicConnectionFactory
The TopicConnection
The TopicSession
The Topic
The TopicPublisher
The TopicSubscriber
The Message
Sessions and Threading
[1] [2] [3] [4] Next