The WebSphere MQ classes for Java contain the following functions that are specifically designed to use API extensions that are not supported by all queue managers. This section describes how they behave when using a queue manager that does not support them.
Some of the MQQueueManager constructors include an optional integer argument. This maps onto the MQI's MQCNO options field, and is used to switch between normal and fast path connection. This extended form of the constructor is accepted in all environments, provided that the only options used are MQCNO_STANDARD_BINDING or MQCNO_FASTPATH_BINDING. Any other options cause the constructor to fail with MQRC_OPTIONS_ERROR. The fast path option MQC.MQCNO_FASTPATH_BINDING is honored only when with a bindings connection to a queue manager that supports it. In other environments, it is ignored.
This can be used only against a WebSphere(R) MQ queue manager on UNIX or Windows systems in bindings mode. Otherwise, it fails with MQRC_ENVIRONMENT_ERROR. See JTA/JDBC coordination using WebSphere MQ base Java for more details.
When using a queue manager that does not support the Version 2 MQGMO structure, leave the following fields set to their default values:
Also, the MatchOptions field support only MQMO_MATCH_MSG_ID and MQMO_MATCH_CORREL_ID. If you put unsupported values into these fields, the subsequent MQQueue.get() fail with MQRC_GMO_ERROR. If the queue manager does not support the Version 2 MQGMO structure, these fields are not updated after a successful MQQueue.get().
The following classes are used to create distribution lists:
You can create and populate MQDistributionLists and MQDistributionListItems in any environment, but not all queue managers allow you to open an MQDistributionList. In particular, z/OS queue managers do not support distribution lists. Attempting to open an MQDistributionList when using such a queue manager results in MQRC_OD_ERROR.
Four fields in the MQPMO are rendered as the following member variables in the MQPutMessageOptions class:
These fields are primarily intended for use with distribution lists. However, a queue manager that supports distribution lists also fills in the DestCount fields after an MQPUT to a single queue. For example, if the queue resolves to a local queue, knownDestCount is set to 1 and the other two count fields are set to 0.
If the queue manager does not support distribution lists, these values are simulated as follows:
The recordFields variable is used with distribution lists. A value can be written into recordFields at any time, regardless of the environment. It is ignored if the MQPutMessageOptions object is used on a subsequent MQQueue.put() or MQQueueManager.put(), rather than MQDistributionList.put().
The following MQMD fields are largely concerned with message segmentation:
If an application sets any of these MQMD fields to values other than their defaults, and then does a put() or get() on a queue manager that does not support these, the put() or get() raises an MQException with MQRC_MD_ERROR. A successful put() or get() with such a queue manager always leaves the MQMD fields set to their default values. Do not send a grouped or segmented message to a Java application that runs against a queue manager that does not support message grouping and segmentation.
If a Java application attempts to get() a message from a queue manager that does not support these fields, and the physical message to be retrieved is part of a group of segmented messages (that is, it has non-default values for the MQMD fields), it is retrieved without error. However, the MQMD fields in the MQMessage are not updated, the MQMessage format property is set to MQFMT_MD_EXTENSION, and the true message data is prefixed with an MQMDE structure that contains the values for the new fields.
Notices |
Downloads |
Library |
Support |
Feedback
![]() ![]() |
csqzaw1334 |