Copyright © TIBCO Software Inc. All Rights Reserved

> JMS Specification
> EMS implements the JMS 1.1 specification, as well as the earlier JMS 1.0.2b specification for older clients. While the JMS 1.0.2b interfaces continue to be supported, they may be deprecated in future releases of the JMS specification. Newly developed applications should use the JMS 1.1 interfaces, and you should discontinue the use of the older interfaces as soon as possible.
> The code examples in this chapter illustrate the use of the JMS 1.1 interfaces.
> JMS 1.1 Specification
> In the JMS 1.1 specification, applications using the point to point (queues) or publish and subscribe (topics) models use the same interfaces to create objects. The JMS specification refers to these interfaces as common facilities because these interfaces create objects that can be used for either topics or queues.
> Figure 18 illustrates the interfaces involved in the JMS API.
> Figure 18 JMS 1.1 Programming Model
> JMS 1.0.2b Specification
> The JMS 1.0.2b specification defined specific interfaces for topics and for queues.
> The JMS 1.0.2b interfaces have the same structure as the JMS 1.1 common facilities, but the interfaces are specific to topics or queues. Figure 19 illustrates the previous interface model used by the JMS API.
> Figure 19 JMS 1.0.2b Programming Model
> Summary of JMS 1.1 and 1.0.2b Interfaces
> Table 43 summarizes the interfaces used in the JMS API to support both the common facilities and specific interfaces.

> Table 43 JMS API object summary
> Common Facilities Interfaces (JMS 1.1) | Specific Interfaces (JMS 1.0.2b) | Description
> ConnectionFactory | QueueConnectionFactory TopicConnectionFactory | Object used to create connections to EMS server.
> Connection | QueueConnection TopicConnection | A connection encapsulates a physical connection with a provider (server). Connections are used to create sessions.
> Session | QueueSession TopicSession | A session is a single-threaded object that creates instances of message producers, message consumers, messages and transacted message groups. Sessions can also be transacted. In a transacted session, a group of messages are sent and received in a single transaction.
> MessageProducer | QueueSender TopicPublisher | A message producer is an object created by a session that is used for sending messages to a destination.
> MessageConsumer | QueueBrowser QueueReceiver TopicSubscriber | A message consumer is an object created by a session that receives messages sent to a destination.
> MessageListener | MessageListener | A message listener is an object that acts as an asynchronous event handler for messages. Message listeners must be registered with a specific MessageConsumer.
> MessageSelector | MessageSelector | Message selectors are optional filters that can be used by the application. They transfer the filtering work to the message provider, rather than the message consumer. A message selector is a String that contains an expression. The syntax of the expression is based on a subset of the SQL92 conditional expression syntax.
> Message | Message | Several types of message bodies are available for queues and topics.
> Queue Topic | Queue Topic | The destination that messages can be sent to or received from. Normally these are created and managed by the server, but clients can create destinations dynamically by using methods on the Session object.

Copyright © TIBCO Software Inc. All Rights Reserved