Udostępnij za pośrednictwem


Setting up WinXPSP2 or WS2003 for XA transactions with MQ

In a previous post, I talked about transactions without components, spanning MQ and SQL Server. The hardest part in doing that was setting up the environment. For posterity, here's what I did:

Steps:

  1. install Windows XPSP2 or WS2003

  2. install the MQ Client or Server software.

  3. install the MQ XA Client (aka "MQ Extended Transactional Client")

  4. install the latest fixpack for WMQ. For Windows v5.3, As of May 2005, this is CSD10.

  5. register the XA DLL in the registry.

    for MQ, according to IBM, the DLL is <MQDIR>\bin\amqmtsxatm.dll but on a MQ client-only machine, it may be <MQDIR>\bin\amqmtsxatmc.dll

    For MQ then, it is:
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDTC\XADLL]
    Key name: amqmtsxatm.dll
    Data: C:\progra~1\ibm\MQ\bin\amqmtsxatm.dll

  6. If you are running the app from an MQ client node, get the interim fix from IBM; I don't know which fix this is. you have to request it. It is not included in CSD10. It may be included in CSD11. If you are running the app on a MQ server node, then you do not need the interim fix.

  7. Turn on DTC in Windows. This is slightly different on XPSP2 and WS2003. On XPSP2, it is like this:
    Control Panel--> Admin Tools --> Component Services --> My Computer --> Properties

    select the MS DTC tab, click the "Security Configuration..." button.
    Check the "Network DTC Access..." box.
    Check the XA box.

  8. allow the "network service" user to read the directory in which the XA DLL resides.

    Use Explorer for this. For my install of MQ, this directory is
    c:\progra~1\ibm\mq\bin\

  9. add "network service" user to the MQM group (or other group authorized to "perform XA recovery" on MQ).

  10. set the NMQ_MQ_LIB variable to c:\progra~1\ibm\mq\bin\mqic32xa.dll. This is from the "Using .NET" doc.)

  11. Run the app

That's it.

[addendum, 13 October 2008: An attentive reader has pointed out that

the WebSphere MQ Solutions in a Microsoft .Net Environment (SG24-7012-00) states:

“WebSphere MQ applications can participate in transactions managed by Microsoft transaction managers. The application either has to be directly connected to a queue manager, or it has to use the extended transactional client function when running on a remote machine.”

So my assertion above, that you need the Extended Transactional Client, may not be appropriate in all cases. When in doubt, prefer the IBM documentation. Better yet, contact IBM for full details. I'm not even sure the Extended client still exists for MQ V6.0 and beyond.

Comments

  • Anonymous
    August 18, 2005
    <P>Does this approach work if your WebSphere MQ Server is running on UNIX, or does MSDTC require it to be on Windows. Dumb question I know, but it isn't documented anywhere in the Extended Client literature. Many Thanks, Sean</P>
    <P>[dino's note: yes, this works even when the MQ Server (Queue Manager) is on a non-Windows platform.&nbsp; In that case you need the MQ Client, as well as the Extended Transaction addition for MQ, installed on the Windows machine. And you need to configure the client (on Windows) to connect to the MQ Server on whatever platform.&nbsp; </P>

  • Anonymous
    October 13, 2008
    PingBack from http://blogs.msdn.com/dotnetinterop/archive/2005/07/06/transactions-swc-and-ibm-mqseries.aspx

  • Anonymous
    August 16, 2010
    Does-it the same configuration to Windows 7 64 bits ?

  • Anonymous
    May 25, 2014
    If still it doesn't work try to give your queue manager name in caps.