The native code base is designed to be re-entrant. The actual
code base does not use threads, but this does not preclude the use of multiple
threads in the application. For example, you can create an application thread
to repeatedly call mqeQueueManager_triggerTransmission().
If you want to use multiple threads, you do not need to call any specific
APIs.
Although it is not a requirement. we recommend that you have an exception
block per thread. If you use one exception block shared across threads, an
exception block for a thread that fails can be overwritten by the exception
block for a thread that succeeds.
Note: You must call
mqeSession_initialize or
mqeSession_terminate once
only, before any threads use an MQe API call. To ensure this, call it in the
main thread before any application threads are created. For example,
do
not use the following:
mqeSession_initialize();
mqeSession_initialize();
mqeSession_terminate();
mqeSession_terminate();