Specifying the user data to be passed to channel exits when using IBM MQ classes for JMS

Up to 32 characters of user data can be passed to a channel exit when it is called.

The SENDEXITINIT property of an MQConnectionFactory object specifies the user data that is passed to each send exit when it is called. The value of the property is a string that comprises one or more items of user data separated by commas. The position of each item of user data within the string determines which send exit, in a sequence of send exits, the user data is passed to. For example, the first item of user data in the string is passed to the first send exit in a sequence of send exits.

You can set the SENDEXITINIT property by using the IBM® MQ JMS administration tool or IBM MQ Explorer. Alternatively, an application can set the property by calling the setSendExitInit() method.

In a similar way, the RECEXITINIT property of a ConnectionFactory object specifies the user data that is passed to each receive exit, and the SECEXITINIT property specifies the user data passed to a security exit. You can set these properties by using the IBM MQ JMS administration tool or IBM MQ Explorer. Alternatively, an application can set the properties by calling the setReceiveExitInit() and setSecurityExitInit() methods.

Note the following rules when specifying user data that is passed to channel exits:
  • If the number of items of user data in a string is more than the number of exits in a sequence, the excess items of user data are ignored.
  • If the number of items of user data in a string is less than the number of exits in a sequence, each unspecified item of user data is set to an empty string. Two commas in succession within a string, or a comma at the beginning of a string, also denotes an unspecified item of user data.

If an application uses a client channel definition table (CCDT) to connect to a queue manager, any user data specified in a client connection channel definition is passed to channel exits when they are called. For more information about using a client channel definition table, see Using a client channel definition table with IBM MQ classes for JMS.