How a .NET application determines what channel definition to use

In the IBM® MQ .NET client environment, the channel definition to be used can be specified in a number of different ways. Multiple specifications of the channel definition can exist. An application derives the channel definition from one or more sources.

If more than one channel definition exists, the one used is selected in the following priority order:
  1. Properties specified on the MQQueueManager constructor, either explicitly or by including MQC.CHANNEL_PROPERTY in the properties hashtable
  2. A property MQC.CHANNEL_PROPERTY in the MQEnvironment.properties hashtable
  3. The property Channel in MQEnvironment
  4. The .NET application configuration file, section name CHANNELS, key ServerConnectionParms (applies to managed connections only)
  5. The MQSERVER environment variable
  6. The client configuration file, stanza CHANNELS, Attribute ServerConnectionParms
  7. The client channel definition table (CCDT). The location of the CCDT is specified in the .NET application configuration file (applies to managed connections only)
  8. The client channel definition table (CCDT). The location of the CCDT is specified using the environment variables MQCHLIB and MQCHLTAB
  9. The client channel definition table (CCDT). The location of the CCDT is specified using the client configuration file
For items 1-3, the channel definition is built up field by field from values provided by the application. These values can be provided using different interfaces and multiple values can exist for each one. Field values are added to the channel definition following the priority order given:
  1. The value of connName on the MQQueueManager constructor
  2. Values of properties from the MQQueueManager.properties hashtable
  3. Values of properties from the MQEnvironment.properties hashtable
  4. Values set as MQEnvironment fields (for example, MQEnvironment.Hostname, MQEnvironment.Port)

For items 4-6, the entire channel definition is supplied as the value. Unspecified fields on the channel definition take the system defaults. No values from other methods of defining channels and their fields are merged with these specifications.

For items 7-9, the entire channel definition is taken from the CCDT. Fields which were not specified explicitly when the channel was defined take the system defaults. No values from other methods of defining channels and their fields are merged with these specifications.