Configuring for queue-based messaging

  1. Install WebSphere MQ and WebSphere MQ client libraries (including JMS support).
  2. 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.
  3. Open <your MQ home directory>Java/bin/jmsAdmin.config and set the following properties:
  4. 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
  5. Bind objects to JNDI names by running <your MQ home directory>/java/bin/jmsAdmin.bat < MyJNDI.txt
  6. Configure the following JMS connector-specific properties as shown:
    CTX_InitialContextFactory = com.sun.jndi.fscontext.RefFSContextFactory
    CTX_ProviderURL = file://c:/temp
    ConnectionFactoryName = MyQCF

Copyright IBM Corp. 1997, 2003