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.
Download and install the appropriate WebSphere MQ MA0C
SupportPac from IBM to enable topic-based (publish/subscribe)
messaging support in MQ. For example, a search for
ma0c_ntmq52 will locate the topic-based messaging patch
for MQ 5.2 on Windows.
Change directories to <your MQ home
directory>/Java/bin and execute runmqsc <
MQJMS_PSQ.mqsc.
Execute IVTSetup.bat The process should display
Done! without reporting any errors.
Open <your MQ home
directory>Java/bin/jmsAdmin.config and set the
following properties:
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