background image

Messaging Domains

<< JMS API Architecture | Publish Subscribe Messaging Domain >>
<< JMS API Architecture | Publish Subscribe Messaging Domain >>

Messaging Domains

Messaging Domains
Before the JMS API existed, most messaging products supported either the point-to-point or the
publish/subscribe approach to messaging. The JMS specification provides a separate domain for
each approach and defines compliance for each domain. A stand-alone JMS provider can
implement one or both domains. A Java EE provider must implement both domains.
In fact, most implementations of the JMS API support both the point-to-point and the
publish/subscribe domains, and some JMS clients combine the use of both domains in a single
application. In this way, the JMS API has extended the power and flexibility of messaging
products.
The JMS 1.1 specification goes one step further: It provides common interfaces that enable you
to use the JMS API in a way that is not specific to either domain. The following subsections
describe the two messaging domains and then describe the use of the common interfaces.
Point-to-Point Messaging Domain
A point-to-point (PTP) product or application is built on the concept of message queues,
senders, and receivers. Each message is addressed to a specific queue, and receiving clients
extract messages from the queues established to hold their messages. Queues retain all messages
sent to them until the messages are consumed or until the messages expire.
PTP messaging has the following characteristics and is illustrated in
Figure 31­3
.
Administrative
Tool
JMS
Client
JNDI Namespace
CF
D
JMS Provider
Bind
Inject
Resource
Logical
Connection
FIGURE 31­2
JMS API Architecture
Basic JMS API Concepts
The Java EE 5 Tutorial · September 2007
898