WebSphere Message Brokers
File: ak09512_
Writer: John Prowse

Task topic

This build: July 31, 2007 21:32:46

Accessing broker properties from ESQL

It can be useful, during the runtime of your code, to have real-time access to details of a specific node, flow, or broker. For an overview of broker properties, see Broker properties.

You can use broker properties on the right side of regular SET statements. For example:
DECLARE mybroker CHARACTER;
SET mybroker = BrokerName;
where BrokerName is the broker property that contains the broker's name. However, you cannot use broker properties on the left-hand side of SET statements. This is because, at runtime, broker properties are constants: they cannot be assigned to, and so their values cannot be changed by SET statements. If a program tries to change the value of a broker property, the error message Cannot assign to a symbolic constant is issued.
Broker properties:
  • Are grouped by broker, execution group, flow, and node.
  • Are case sensitive. Their names always start with an uppercase letter.
  • Return NULL if they do not contain a value.

If your ESQL code already contains a variable with the same name as one of the broker properties, your variable takes precedence; that is, your variable masks the broker property. To access the broker property, use the form SQL.<broker_property_name>. For example: SQL.BrokerName.

Broker properties that are accessible from ESQL and Java shows the broker, flow, and node properties that are accessible from ESQL and indicates which properties are also accessible from Java.

Related concepts
Broker properties
Related tasks
Accessing broker properties from the JavaCompute node
Related reference
Broker properties that are accessible from ESQL and Java
Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2007Copyright IBM Corporation 1999, 2007. All Rights Reserved.
This build: July 31, 2007 21:32:46

ak09512_ This topic's URL is: