The IBM WebSphere MQ classes for JMS configuration file

A WebSphere® MQ classes for JMS configuration file specifies properties that are used to configure WebSphere MQ classes for JMS.

The format of a WebSphere MQ classes for JMS configuration file is that of a standard Java properties file. A sample configuration file called jms.config is supplied in the bin subdirectory of the WebSphere MQ classes for JMS installation directory. This file documents all the supported properties and their default values.

You can choose the name and location of a WebSphere MQ classes for JMS configuration file. When you start your application, use a java command with the following format:
java -Dcom.ibm.msg.client.config.location=config_file_url application_name
In the command, config_file_url is a uniform resource locator (URL) that specifies the name and location of the WebSphere MQ classes for JMS configuration file. URLs of the following types are supported: http, file, ftp, and jar.
Here is an example of a java command:
java -Dcom.ibm.msg.client.config.location=file:/D:/mydir/myjms.config MyAppClass
This command identifies the WebSphere MQ classes for JMS configuration file as the file D:\mydir\mjms.config on the local Windows system.

When an application starts, WebSphere MQ classes for JMS reads the contents of the configuration file and stores the specified properties in an internal property store. If the java command does not identify a configuration file, or if the configuration file cannot be found, WebSphere MQ classes for JMS uses the default values for all the properties. If required, you can override any property in the configuration file by specifying it as a system property on the java command.

A WebSphere MQ classes for JMS configuration file can be used with any of the supported transports between an application and a queue manager or broker.

Note that you cannot specify startup trace by setting a property in the WebSphere MQ classes for JMS configuration file. You can specify startup trace only by setting a system property on the java command, as shown in the following example:
java -Dcom.ibm.msg.client.commonservices.trace.startup=true
     -Dcom.ibm.msg.client.config.location=file:/D:/mydir/myjms.config
      MyAppClass

Overriding properties specified in a WebSphere MQ MQI client configuration file

A WebSphere MQ MQI client configuration file can also specify properties that are used to configure WebSphere MQ classes for JMS. However, properties specified in a WebSphere MQ MQI client configuration file apply only when an application connects to a queue manager in client mode.

If required, you can override any attribute in a WebSphere MQ MQI client configuration file by specifying it as a property in a WebSphere MQ classes for JMS configuration file. To override an attribute in a WebSphere MQ MQI client configuration file, use an entry with the following format in the WebSphere MQ classes for JMS configuration file:
com.ibm.mq.cfg.stanza.propName=propValue
The variables in the entry have the following meanings:
stanza
The name of the stanza in the WebSphere MQ MQI client configuration file that contains the attribute
propName
The name of the attribute as specified in the WebSphere MQ MQI client configuration file
propValue
The value of the property that overrides the value of the attribute specified in the WebSphere MQ MQI client configuration file

Alternatively, you can override an attribute in a WebSphere MQ MQI client configuration file by specifying the property as a system property on the java command. Use the preceding format to specify the property as a system property.

Only the following attributes in a WebSphere MQ MQI client configuration file are relevant to WebSphere MQ classes for JMS. If you specify or override other attributes, it has no effect.