Use channel exits not written in Java

 

A WebSphere MQ base Java application can use channel exit programs that are written in C or C++. Three classes are provided for this purpose:

To use a security exit that is not written in Java™, an application must first create an MQExternalSecurityExit object. The application specifies, as parameters on the MQExternalSecurityExit constructor, the name of the library containing the security exit, the name of the entry point for the security exit, and the user data to be passed to the security exit when it is called. The application can then assign the MQExternalSecurityExit object to the MQEnvironment.securityExit field before creating an MQQueueManager object. The MQExternalSecurityExit object contains all the information required to construct the MQCXP and MQCD structures that are passed to the security exit when it is called.

An application can use a send or a receive exit that is not written in Java in a way similar to that just described for a security exit.

If an application connects to a queue manager by setting channel related fields or environment properties in the MQEnvironment class, no user data can be passed to channel exit programs when they are called. If an application uses a client channel definition table to connect to a queue manager, any user data specified in a client connection channel definition is passed to channel exit programs when they are called. On i5/OS, however, no user data can be passed to channel exit programs, even if the application uses a client channel definition table. For more information about using a client channel definition table, see Using a client channel definition table.

You must store channel exit programs that are not written in Java in the directory shown in Table 1.

For information about how to write a channel exit in C or C++, see WebSphere MQ Intercommunication.


uj11180_