See information about the latest product version
Linux and UNIX systems: configuring the queue manager to coordinate JMS resources
Define a stanza in the broker's queue manager qm.ini file for each new JMS provider, where the JMS provider can be specified by a JMS node included in a message flow that is running on the broker.
The parameters that are defined in XAOpenString are comma delimited and positional. Represent missing optional parameters by a comma if you include other parameters later in the string.
The following stanza entry is an example that you can add when using WebSphere® MQ Java™ as the JMS provider:
XAResourceManager:
Name=WBIWMQJMS
SwitchFile=/install_dir/lib/JMSSwitch.so
XAOpenString=<Initial Context Factory>,
<location of JNDI bindings>'
<LDAP Principal>,
<LDAP Credentials>,
<Recovery Connection Factory Name>,
<JMS Principal>,
<JMS Credentials>
ThreadOfControl=THREAD
- install_dir
- Is the location of the WebSphere Message Broker installation. This value is mandatory where the LDAP parameters are omitted, but a user-defined Queue Connection Factory is specified for recovery.
- <Initial Context Factory>
- Is the Initial Context Factory identifier for the JMS provider; this value is required.
- <Location of JNDI bindings>
- Is either the file path to the bindings file, or the LDAP directory location of the JNDI administered objects that can be used to create an initial context factory for the JMS connection. When supplying the file path to the bindings file, do not include the file name. See the JMSInput or JMSOutput node for further details on creating the JNDI administered objects; this value is required.
- <LDAP Principal>
- Is an optional parameter used to specify the principal (user ID) that might be required when an LDAP database is used to hold the JNDI administered objects.
- <LDAP Credentials>
- Is an optional parameter used to specify the Credentials (password) that might be required if a password protected LDAP database is used to hold the JNDI administered objects.
- <Recovery Connection Factory Name>
- Is an optional parameter used to specify the name of a Queue Connection Factory object in the JNDI administered objects for recovery purposes, when the non default name is required.
- <JMS Principal>
- Is an optional parameter for the user ID required to connect to a JMS provider, using a secure JMS Connection Factory.
- <JMS Credentials>
- Is an optional parameter for the password required to connect to the same JMS provider in conjunction with the JMS principal.
Switch files are installed in the install_dir /lib directory. To simplify the contents of the qm.ini file, create a symbolic link to the switch file for the queue manager to retrieve from /var/mqm/exits (for 32-bit brokers) or /var/mqm/exits64 (for 64-bit brokers). For example:
ln -s install_dir/lib/libJMSSwitch.so /var/mqm/exits/JMSSwitch
ln -s install_dir/lib/libJMSSwitch.so /var/mqm/exits64/JMSSwitch
If you create a link for both 32-bit and 64-bit switch files on a single computer, ensure that you specify the same name in /exits and in /exits64, as shown in the example.
The values for the Initial Context factory and Location of JNDI bindings in the stanza must match the values that you specified in the JMS or SOAP nodes in the message flows.
All LDAP parameters must match the values that you specified on the mqsicreatebroker or mqsichangebroker command.
The Recovery Factory Name must match a Queue Connection Factory name that is created in the JNDI administered objects. If you do not specify a name, a default factory called recoverXAQCF is used. In either case, this value must refer to a JNDI administered object that has already been created.
The JMS Principal and JMS Credentials must be configured together.
XAResourceManager:
Name=XAJMS_PROVIDER1
SwitchFile=/opt/var/mqsi/lib/JMSSwitch.so
XAOpenString= com.sun.jndi.fscontext.RefFSContextFactory,
/Bindings/JMSProvider1_Bindings_Directory,
,
,
,
myJMSuser1,
passwd
ThreadOfControl=THREAD
where:- XAJMS_PROVIDER1
- Is the user-defined name for the resource manager
- /opt/var/mqsi
- Is the <Installation Path>
- com.sun.jndi.fscontext.RefFSContextFactory
- Is the <Initial Context Factory>
- /Bindings/JMSProvider1_Bindings_Directory
- Is the location of the bindings
- myJMSuser1
- Is the <JMS Principal>
- passwd
- Is the password used in <JMS Credentials>