I have already gathered several times in circles about this. I am trying to connect to the distributed queue manager using the provided channel table file. I can make this work if I point to the environment variable MQCHLLIB and MQCHLTAB on my server. However, the IBM documentation states that the .net configuration file may override these variables.
Here is what I put in my web.config file:
... <configSections> <section name="CHANNELS" type="System.Configuration.NameValueSectionHandler" /> </configSections> <CHANNELS> <add key="ChannelDefinitionDirectory" value="C:\temp"></add> <add key="ChannelDefinitionFile" value="DSM_MOM_TEST.tab"></add> </CHANNELS> ...
And here is the code that runs:
Hashtable properties = new Hashtable(); //Add managed connection type to parameters. const String connectionType = MQC.TRANSPORT_MQSERIES_CLIENT; properties.Add(MQC.TRANSPORT_PROPERTY, connectionType); return new MQQueueManager(queueManagerName, properties);
queueManagerName is set to the general queue manager "* Q101T".
However, this does not work, and I get an error: 2058 MQRC_Q_MGR_NAME_ERROR
I was unable to find additional documentation on how to make this work, other than environment variables, and the standard mqclient.ini should be overridden by the line of channels in the web.config file.
Is there something I missed in the code? Any advice would be greatly appreciated.
Edit: I changed connectionType to MQC.TRANSPORT_MQSERIES_MANAGED and I overcame the error I was getting. However, now I get an I / O error:
Error System.IO.IOException was not processed user code Message = "I / O error" Source = "amqmdnet"
Stack Traces: in IBM.WMQ.MQChannelTable.CreateChannelEntryLists (MQChannelListEntry list names)
I think this is most likely due to https://www-304.ibm.com/support/docview.wss?uid=swg1IC69174 , so I'm now waiting from middleware partners to make sure this is the case hopefully provide me a new .TAB file ...
Edit2 It seems like this is not a problem. I started the MQ trace and made a mistake because it could not find the AMQCLCHL.TAB file. I do not understand why it is still looking for this file. It should use the feed table specified in my web.config. Does anyone know why he does not raise these values?