On Windows you use the WebSphere MQ Explorer
or WebSphere MQ Services snap-in, depending on
which version of WebSphere MQ you are using,
to configure the stanza.
The Switch file is called JMSSwitch.dll;
see Refer to the WebSphere MQ System Administration
Guide for details on how to update the qm.ini file.
The extra entry,
called the XACloseString, should match the values provided
for the XAOpenString.
For the broker's queue manager, place a stanza entry
in an initialization file, for example qm.ini, for each JMS
provider that can be used by a JMSInput node.
You must specify
a stanza in the broker's queue manager .ini file for each
JMS provider that you want to use. There must be one stanza for each new JMS
provider, where the JMS provider can be specified by any JMSInput or JMSOutput
node included in a message flow that is running on a broker.
The
parameters that are supplied on XAOpenString are comma delimited
and positional. Any missing optional parameter must be represented by a comma
if other parameters are provided later in the string.
The following
stanza entry is an example you can add when using
WebSphere MQ Java
as the JMS provider:
XAResourceManager:
Name=WBIWMQJMS
SwitchFile=/<Installation Path>/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
where:
- <Installation Path>
- 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.
The values for the Initial Context factory
and Location of JNDI bindings in the stanza must match those specified in
the JMSInput or JMSOutput nodes in the message flows.
Any
LDAP parameters must match those that have been specified by using 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 this is omitted,
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
Following is an example format of a stanza
in the
qm.ini file that describes a JMS provider for global
transactions:
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>
In this example the optional fields
<LDAP Principal>,
<LDAP
Credentials>, and
<Recovery Connection Factory Name> are
not required, so only the positional comma delimiters are configured in the
XAOpenString stanza.