Use channel exits

 

A WebSphere MQ JMS application can use channel security, send, and receive exits on the MQI channel that starts when the application connects to a queue manager. The application can use exits written in Java™, C, or C++. The application can also use a sequence of send or receive exits that are run in succession.

Only an application that connects to a queue manager in client mode can use channel exits. An application cannot use channel exits if it connects in bindings mode.

The SENDEXIT property of a ConnectionFactory object specifies the send exit, or exits, used by a connection. The value of the property is a string that comprises one or more items separated by commas. Each item identifies a send exit in one of the following ways:

We can set the SENDEXIT property by using the WebSphere MQ JMS administration tool, or an application can set the property by calling the setSendExit() method.

In a similar way, the RECEXIT property of a ConnectionFactory object specifies the receive exit, or exits, used by a connection, and the SECEXIT property specifies the security exit used by a connection.

The SENDEXITINIT property of a ConnectionFactory 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. We can set the SENDEXITINIT property by using the WebSphere MQ JMS administration tool, or 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.

Note the following rules when specifying user data that is passed to channel exits:

On i5/OS, no user data can be passed to channel exit programs that are written in C or C++.

For information about how to write a channel exit in Java, and how to make sure that WebSphere MQ JMS can locate the JAR or class files containing channel exit classes, see Using channel exits.

For information about how to write a channel exit in C or C++, see WebSphere MQ Intercommunication. You must store channel exit programs that are not written in Java in the directory shown in Table 1.

If your application uses a client channel definition table to connect to a queue manager, see Using a client channel definition table.


uj25310_