Create JMS bindings in WebSphere® MQ.
Before you begin
Ensure that WebSphere MQ classes for Java™ are already installed. These classes get installed during the
installation of WebSphere MQ.
Procedure
- On the server computer, create a QueueManager <QManagerName>.
- On the server computer's command line, run
the following executable:
<MQInstallDir>/bin/runmqlsr -m <QManagerName> -t TCP -p <PORT>
- On the client computer, edit the JMSAdmin.config properties
file to contain the following lines:
INITIAL_CONTEXT_FACTORY=<JNDI_ICF>
PROVIDER_URL=<JNDI_URL>
where <JNDI_ICF> is
the Initial Context Factory (ICF) class for use with the JNDI you
have chosen. For example, com.sun.jndi.fscontext.RefFSContextFactory. <JNDI_URL> is
the path of the provider URL which is provided in the format expected
by the JNDI server and ICF.
- On the client computer, create a .scp command
file that contains the following parameters:
def qcf( <QCFName> ) qmgr(<QManagerName>) transport(CLIENT) host(<ipaddress
of Server> ) channel(SYSTEM.DEF.SVRCONN) port( <PORT> )
def q(getATP) qu(getATP)
def q(reply_getATP) qu(reply_getATP)
def q(createOrder) qu(createOrder)
end
- On the client computer, pass the .scp file
to the WebSphere MQ JMSAdmin
class using the following syntax:
java com.ibm.mq.jms.admin.JMSAdmin < intsetup.scp
This creates a .bindings file
in the directory specified for the provider URL. All the JAR files
in <MQ_HOME>/java/lib/ directory should
be listed in your CLASSPATH environment variable.