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.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 ModelThe 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 ModelTable 42 summarizes the interfaces used in the JMS API to support both the common facilities and specific interfaces.
Table 42 JMS API object summary Common Facilities Interfaces A connection encapsulates a physical connection with a provider (server). Connections are used to create sessions. 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. A message producer is an object created by a session that is used for sending messages to a destination. A message consumer is an object created by a session that receives messages sent to a destination. A message listener is an object that acts as an asynchronous event handler for messages. Message listeners must be registered with a specific MessageConsumer. 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. Several types of message bodies are available for queues and topics. 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.