Identifiers
An identifier refers to
either a standard JMS header field name or
a custom message property name. Any JMS header field name can be used
as an identifier, except for JMSDestination
,
JMSExpiration
, JMSRedelivered
,
and JMSReplyTo
, which can be used as identifiers
in a message selector. JMSDestination
and
JMSReplyTo
are Destination
values, and message selector operators support only numeric, boolean
or string values. The time at which message selectors are applied to
messages isn’t specified in the JMS specification,
so using the value of JMSExpiration
doesn’t provide a consistent, well-defined result.
Using JMSRedelivered
in a selector can result in
unexpected results. If, for example, a selector checks for
JMSRedelivered
being true
, the
first delivery attempt by a provider will fail the selector because
the redelivered flag should be false
, but the
provider can then immediately redeliver the message and pass the
selector, making the redelivered part of the predicate ineffective.
Identifier names are
case-sensitive and follow the same general rules as Java identifiers.
They must start with a valid Java
identifier start character as determined by the
java.lang.Character.isJavaIdentifierStart( )
method. For example, a letter, currency symbol, or connecting
punctuation character such as an underscore _
contain valid Java identifier characters as determined by the
Character.isJavaIdentifierPart( )
method. You can’t
use these reserved words for identifiers: NULL
,
TRUE ...
Get Java Enterprise in a Nutshell, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.