Using the WMQDotnetXAMonitor application

The WMQDotnetXAMonitor application must be run manually. It can be started at any time. You can start it when you see the messages on the SYSTEM.DOTNET.XARECOVERY.QUEUE or you can keep it running in the background before you do any transactional work with the applications that are written using IBM® MQ .NET classes.

Use the following command to start the monitor application

WmqDotnetXAMonitor.exe -m <QueueManagerName> -n <ConnectionName> -c <Channel> -i

Where

  • n
    Connection name in host (port) format. Connection Name can contain more than one connection name. Multiple connection names must be given in comma separated list, for example localhost (1414), localhost (1415), localhost (1416). Monitor application run the recovery for each of the connection names specified in the comma separated list.
    c
    Channel name.
    m
    Queue manager name.
    Optional
    i
    Heuristic branch completion.
    Optional
The monitor application performs the following actions:
  1. Checks the queue depth of SYSTEM.DOTNET.XARECOVERY.QUEUE at an interval of 100 seconds.
  2. If the queue depth is greater than zero the XA monitor browses the queue for messages and checks if the message satisfies the incomplete transaction criteria.
  3. If any of the messages satisfy the incomplete transaction criteria, monitor pulls it out, and retrieves the transaction recovery information.
  4. It then determines if the recovery information relates to the local MS DTC. If yes then it proceeds to recover the transaction. Otherwise it goes back to browse the next message.
  5. It then makes calls to the queue manager to recover the incomplete transaction.