Configuring WebSphere MQ to be the JMS provider

If you want to use WebSphere® MQ as the JMS provider for the event runtime, and you either did not select the JMS provider or you selected WebSphere Application Server default messaging when you created or augmented the Decision Server Events profile, you must do some additional configuration of WebSphere MQ, WebSphere Application Server, and Decision Server Events.

Before you begin

The event runtime can be configured to work with only one JMS provider: either the WebSphere Application Server default messaging or WebSphere MQ, but not both.

You must have the WebSphere MQ client installed on the same computer as Decision Server Events.

Configuring WebSphere MQ

About this task

The WebSphere MQ administrator must do the following tasks:

Procedure

  1. Create the queue manager, by using the crtmqm command.
  2. Start the queue manager, by using the strmqm command.
  3. If you are using WebSphere MQ V6, start the Publish/Subscribe Engine of the queue manager, by using the strmqbrk command.
  4. If you are using WebSphere MQ V7.1, publish/subscribe must be enabled. Use the ALTER QMGR for this queue manager.
  5. Create the queues required, by running:
    runmqsc 
    queue-manager-name < mq-install-dir\java\bin\MQJMS_PSQ.mqsc
    where mq-install-dir is the installation location of WebSphere MQ.
  6. If you are configuring a cluster, create the extra queues required, by running:
    runmqsc queue-manager-name < <InstallDir>\config\was\create_MQ_JMS_MQ_queues.mqsc
    where <InstallDir> is the installation location of Decision Server Events.

Configuring Decision Server Events

Before you begin

Before you configure Decision Server Events to use WebSphere MQ as the JMS provider, you must know the appropriate queue manager name, the WebSphere MQ host name and port, and the client transport type. Obtain these values from the WebSphere MQ administrator.

The configure_messaging and configure_MQ_JMS_messaging files referenced in this topic rely on settings in the setenv file. Check and confirm your settings before doing the following steps. For more information, see Editing the setenv files.

Procedure

  1. If, when you created or augmented the Decision Server Events profile, you chose to use WebSphere Application Server default messaging but now you want to use WebSphere MQ as the JMS provider instead, run the following command to remove the messaging configuration that was done by the profile:
    Table 1. Command to run.
    Operating system Location in which you must run the command Command
    Windows <InstallDir>\config\was\ configure_messaging.bat -undo
    Linux, UNIX and z/OS® <InstallDir>/config/was/ configure_messaging.sh -undo

    If, when you created or augmented the Decision Server Events profile, you did not select the JMS provider, you do not need to do this step.

  2. Configure Decision Server Events and WebSphere Application Server:
    1. Navigate to <InstallDir>/config/was directory.
    2. Run the following script:
      configure_MQ_JMS_messaging –q queue-manager-name 
      [–p  queue-manager-port] [–h queue-manager-host] [-s scope] 
      [-t transport] [-c channel-name]  
      where
      • queue-manager-name is the name of the queue manager that you created when configuring your installation of WebSphere MQ
      • queue-manager-port is the port on which the queue manager is listening (the default value is 1414)
      • queue-manager-host is the host name of the computer on which the queue manager is hosted (the default value is localhost)
      • scope is a valid WebSphere Application Server scope
      • transport is BINDINGS or CLIENT
      • channel-name is the name of the server connection channel

      For example:

      configure_MQ_JMS_messaging –q QM_PSG –p 1415 –h localhost

      The script creates the following objects in WebSphere Application Server:

      Table 2. Connection factories.
      Connection factories JNDI name
      Queue connection factory jms/WbeQueueConnectionFactory
      Topic connection factory jms/WbeTopicConnectionFactory
      Connection factory jms/WbeConnectionFactory
      Table 3. Topics.
      Topics JNDI name
      Action topic jms/actionTopic
      Command topic jms/commandTopic
      CbeListener topic jms/WBE/CbeListener
      Durable action topic jms/durableActionTopic
      Durable event topic jms/durableEventDestination
      Event topic jms/eventDestination
      History topic jms/historyModuleDestination
      Table 4. Activation specifications.
      Activation specification name JNDI name
      wbe_events jca/wbe_events
      wbe_events_durable jca/wbe_events_durable
      wbe_history jca/wbe_history
      wbe_reset_watch jca/wbe_reset_watch
      wbe_ute_receive jca/wbe_ute_receive
    3. Ensure that the names of these objects are consistent with the corresponding properties.

      For details of how to set these properties, see Setting properties.

      If you are using Properties, these properties are in the JMS Server Settings and the Topics subsections of the JMS section.

    4. Restart WebSphere Application Server to apply the changes.

Results

Decision Server Events is now configured to use WebSphere MQ as the JMS messaging provider.

What to do next

Make sure that the queue names created by create_MQ_JMS_MQ_queues.mqsc are consistent with the queue names that are specified by your WebSphere MQ JMS event destination, durable event destination, and history module destination queue definitions. These queue definitions can be found in the WebSphere Application Server administrative console under Resources > JMS > Queues.
Important: Although the names of these resources reference topics, these resources are actually queues for clusters.
By default, the WebSphere MQ queues are called:
  • eventQueue for the event destination
  • durableEventQueue for the durable event destination
  • historyModuleQueue for the history module destination