Java Reference
In-Depth Information
TABLE 20-1. How JMS Message Header Field Values Are Set
Each header field has associated setter and getter methods, which are documented in the
description of the Message interface. Some header fields are intended to be set by a cli-
ent, but many are set automatically by the send or the publish method, which over-
rides any client-set values.
Message Properties
You can create and set properties for messages if you need values in addition to those
provided by the header fields. You can use properties to provide compatibility with other
messaging systems, or you can use them to create message selectors (see “ JMS Message
Selectors on page 355 ) . For an example of setting a property to be used as a message se-
lector, see “ An Application That Uses the JMS API with a Session Bean on page 416 .
The JMS API provides some predefined property names that a provider can support. The
use of these predefined properties or of user-defined properties is optional.
Message Bodies
The JMS API defines five message body formats, also called message types, which allow
you to send and receive data in many different forms and which provide compatibility
with existing messaging formats. Table 20-2 describes these message types.
Search WWH ::




Custom Search