Section E.2. Identifiers


E.2. 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. 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 is not specified in the JMS specification, so using the value of JMSExpiration wouldn't provide a consistent, well-defined result. Using JMSRedelivered in a selector could 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 since the redelivered flag should be false, but the provider could 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( ) methode.g., a letter, currency symbol, or connecting punctuation character like "_"and must contain valid Java identifier characters as determined by the Character.isJavaIdentifierPart( ) method. You cannot use the following reserved words for identifiers: NULL, TRUE, FALSE, NOT, AND, OR, BETWEEN, LIKE, IN, IS, or ESCAPE.

The type of an identifier is the type of the header field or property being referenced as its value was set in the message. It's important to remember that the evaluation of an identifier in a message selector does not apply type conversion functions according to the context that it's used in. If you attempt to refer to a numeric property value in an expression with a string comparison operator, for example, then the expression will always evaluate to false. If the named header field or property is not present in a message, then the identifier evaluates to a NULL value.



Java Enterprise in a Nutshell
Java Enterprise in a Nutshell (In a Nutshell (OReilly))
ISBN: 0596101422
EAN: 2147483647
Year: 2004
Pages: 269

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net