The IBM® MQ
.NET client provides an XA Monitor application,
WmqDotnetXAMonitor, that you can use to recover any incomplete distributed transactions. The
WmqDotnetXAMonitor application establishes a connection to the queue manager where the transactions
are in-doubt and then resolves the transaction based on the parameters that you set.
About this task
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.
You can either set the parameter values for WMQDotnetXAMonitor through the command line or by
using an application configuration file. Values that are provided through the application
configuration file take precedence over values set through the command line.
Before IBM MQ 9.3.0, the connection that WMQDotnetXAMonitor establishes is
a nonsecure connection.
From IBM MQ 9.3.0, you have the option
of establishing a secure connection to the queue manager by setting additional parameters for
WMQDotnetXAMonitor.
Procedure
- To provide input to WmqDotNETXAMonitor by using an application configuration file, see
WmqDotNETXAMonitor application configuration file settings.
-
To start the WMQDotnetXAMonitor application from the command line, use the following command
with the parameters that you require:
Before
IBM MQ 9.3.0:
WmqDotnetXAMonitor.exe -m QueueManagerName -n ConnectionName -c ChannelName -i
From
IBM MQ 9.3.0:
WmqDotnetXAMonitor.exe -m QueueManagerName -n ConnectionName -c ChannelName -i -k SSL Key Repository -s Cipher Spec
The parameters that you can specify are as follows:
-
- -m QueueManagerName
- The queue manager name.
- Optional
- -n ConnectionName
- The connection name in host (port) format. ConnectionName can contain more
than one connection name. Multiple connection names must be given in a comma separated list, for
example
localhost (1414), localhost (1415), localhost (1416). The
WMQDotnetXAMonitor application runs the recovery for each of the connection names specified in the
comma separated list.
- -c ChannelName
- The channel name.
- -i
- Heuristic branch completion.
- Optional
- -k SSL Key Repository
- The name of the SSL key repository. The supported values are:
- *SYSTEM (this is the default value)
- *USER
- Optional
- -s Cipher Spec
- The CipherSpec that you set must be one of the CipherSpecs for the supported version and it can
preferably be the same as the one specified in the Windows Group Policy. For more information, see CipherSpec support for the managed .NET client.
- Mandatory for establishing a secure connection to the queue manager.
- -dn SSLPeer Name
- The SSL peer name used to check the Distinguished Name (DN) of the certificate from the peer
queue manager.
- Optional
- -cl Certificate Label
- The label name that identifies the certificate.
- Optional
- -sn OutboundSNI
- Whether the Server Name Indication (SNI) should be set to the target IBM MQ channel name to the remote system when initiating a TLS
connection, or to the hostname. The supported values for this option are:
- CHANNEL (this is the default value)
- HOSTNAME
- *
If no value is set then the default value, that is CHANNEL, is used.
- Optional
- -cr Certificate Revocation Check
- Whether certification revocation checking is to be done. The supported values for this option
are:
- true
- false (this is the default value)
- Optional
- -kr KeyResetCount
- The total number of unencrypted bytes that are sent and received on the channel before the
secret key used for encryption is renegotiated.
- The default value of 0 indicates that secret keys are never renegotiated
- Optional
The WMQDotnetXAMonitor application performs the following actions:
- Checks the queue depth of SYSTEM.DOTNET.XARECOVERY.QUEUE at an interval of 100 seconds.
- If the queue depth is greater than zero, browses the queue for messages and checks if the
messages satisfy the incomplete transaction criteria.
- If a message satisfies the incomplete transaction criteria, pulls it out, and retrieves the
transaction recovery information.
- Determines if the recovery information relates to the local Microsoft
Distributed Transaction coordinator (MS DTC). If this is the case, then WMQDotnetXAMonitor
proceeds to recover the transaction, otherwise it goes back to browse the next message.
- Makes calls to the queue manager to recover the incomplete transaction.