- Install WebSphere MQ and WebSphere MQ client libraries
(including JMS support).
- Ensure that all MQ client libraries, including
fscontext.jar and providerutil.jar, are in your
system's classpath. Alternatively, you can modify the
jmsAdmin.bat file and add -Djava.ext.dirs="<your
MQ home directory>/Java/lib to the java command-line
script to ensure that all client library files are available to the
tool. Note that any ClassDefNotFoundExceptions reported by the tool
are the result of missing libraries--recheck your classpaths.
- Open <your MQ home
directory>Java/bin/jmsAdmin.config and set the
following properties:
-
INITIAL_CONTEXT_FACTORY=com.sun.jndi.fscontext.RefFSContextFactory
- PROVIDER_URL=file://c:/temp
- SECURITY_AUTHENTICATION=none
- Create a file named MyJNDI.txt containing the
following:DEFINE QCF(MyQCF) HOST(<your host name>)
+PORT(<your MQ listener port name e.g. 1414>)
+
CHANNEL(<your MQ server connection channel name, for
example, CHANNEL1>) +
QMGR(<your MQ queue manager name>) +
TRAN(client)
END
- Bind objects to JNDI names by running <your MQ home
directory>/java/bin/jmsAdmin.bat < MyJNDI.txt
- Configure the following JMS connector-specific properties as
shown:
CTX_InitialContextFactory =
com.sun.jndi.fscontext.RefFSContextFactory
CTX_ProviderURL = file://c:/temp
ConnectionFactoryName = MyQCF
