The JMS 1.1 model

 

We can write a JMS application using two styles of messaging:

These styles of messaging are also referred to as messaging domains and we can combine both styles of messaging in one application.

With versions of JMS before JMS 1.1, programming for the point-to-point domain uses one set of interfaces and methods, and programming for the publish/subscribe domain uses another set. The two sets are similar, but separate. With JMS 1.1, we can use a common set of interfaces and methods that support both messaging domains. The common interfaces provide a domain independent view of each messaging domain. Table 1 lists the JMS 1.1 domain independent interfaces and their corresponding domain specific interfaces.

The JMS 1.1 domain independent interfaces
Domain independent interfaces Domain specific interfaces for the point-to-point domain Domain specific interfaces for the publish/subscribe domain
ConnectionFactory QueueConnectionFactory TopicConnectionFactory
Connection QueueConnection TopicConnection
Destination Queue Topic
Session QueueSession TopicSession
MessageProducer QueueSender TopicPublisher
MessageConsumer

QueueReceiver
QueueBrowser

TopicSubscriber

JMS 1.1 retains all the domain specific interfaces in JMS 1.0.2b, and so existing applications can still use these interfaces. For new applications, however, consider using the JMS 1.1 domain independent interfaces.

In the WebSphere MQ JMS implementation of JMS 1.1, the administered objects are the following:

Destination is an abstract superclass of Queue and Topic, and so an instance of Destination is either a Queue or a Topic object. The domain independent interfaces treat a queue or a topic as a destination. The messaging domain for a MessageConsumer or a MessageProducer object is determined by whether the destination is a queue or a topic.


uj24970_