Use a client channel definition table with .NET

We can use a client channel definition table (CCDT) with the .NET classes for IBM MQ . You specify the location of the CCDT in different ways, depending on whether we are using a managed or unmanaged connection.


Non-XA or XA unmanaged client connection type

With an unmanaged connection type, we can specify the location of the CCDT in two ways:

  • Use the environment variables MQCHLLIB to specify the directory where the table is located, and MQCHLTAB to specify the file name of the table.
  • Use the client configuration file. In the CHANNELS stanza, use the attributes ChannelDefinitionDirectory to specify the directory where the table is located, and ChannelDefinitionFile to specify the file name.

If the location is specified both in the client configuration file and by using environment variables, the environment variables take priority. We can use this feature to specify a standard location in the client configuration file and override it using environment variables when necessary.


Managed client connection type

With a managed connection type, we can specify the location of the CCDT in three ways:

  • Use the .NET application configuration file. In the CHANNELS section, use the keys ChannelDefinitionDirectory to specify the directory where the table is located, and ChannelDefinitionFile to specify the file name.
  • Use the environment variables MQCHLLIB to specify the directory where the table is located, and MQCHLTAB to specify the file name of the table.
  • Use the client configuration file. In the CHANNELS stanza, use the attributes ChannelDefinitionDirectory to specify the directory where the table is located, and ChannelDefinitionFile to specify the file name.

If the location is specified in more than one of these ways, the environment variables take priority over the client configuration file, and the .NET Application Configuration File takes priority over both other methods. We can use this feature to specify a standard location in the client configuration file and override it using environment variables or the application configuration file when necessary. Parent topic: Writing and deploying IBM MQ .NET programs