Configuring for topic-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. 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.
  4. Change directories to <your MQ home directory>/Java/bin and execute runmqsc < MQJMS_PSQ.mqsc.
  5. Execute IVTSetup.bat The process should display Done! without reporting any errors.
  6. Open <your MQ home directory>Java/bin/jmsAdmin.config and set the following properties:
  7. 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

  8. Bind objects to JNDI names by running <your MQ home directory>/java/bin/jmsAdmin.bat < MyJNDI.txt
  9. 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