Topic updated on September 17, 2021

Creating JMS listener

This section will describe how to create a Java Message Service (JMS) based listener.

Assumptions

The following is assumed:

  • The JMS Listener can support the following JMS Servers:
    • IBM WebSphere Application Server (WAS) 6.0 or later
      • The WAS administrator has created a Service Integration Bus (SIB) and one or more SIB queues.
    • IBM WebSphere MQ 6.0 or later
      • The WebSphere MQ Administrator has configured one or more WebSphereMQ Queues.
    • SAP NetWeaver Application Server 7.1
      • The Application Server administrator has configured one of more queues.
  • The information on Enabling SAP JMS NetWeaver support has been reviewed, and the required SAP JMS NetWeaver support jar files have been added to the Staging Browser /system/jars folder.
  • General JMS Configuration Topics:
    • The JMS server is accessible on the network using a Fully Qualified Domain Name (this is not required for WebSphere - SIB Direct or WebSphere - WMQ).
    • The node is configured to access a valid DNS server for resolving host names. For some products, the DNS server is defined using the node's operating system tools. For other products, the DNS server is defined using the System Administration > Network Configuration tab (this is not required for accessing WebSphere - SIB Direct or WebSphere - WMQ).
    • The Administrator has created a JMS Queue Connection Factory, a JMS queue for requests, and optionally a JMS queue for replies.
    • The Administrator has registered the Queue Connection Factory and the queue(s) in the server's JNDI namespace and has given you those registration names if applicable.

Availability

The following Enterprise Gateway products do not support the indicated JMS servers due to platform limitations.

  • MESInterface IT
    • NetWeaver
  • deviceWISE Enterprise Gateway for Siemens ERPC
    • WebSphere - SIB
    • NetWeaver

Procedures

To create a JMS Listener follow these steps:

  1. From the Workbench left pane, expand the node that you want to add the listener to.
  2. Expand Enterprise, right-click the Listeners icon to display its pop-up menu, and then click New.
    The Listener window appears.
  3. Use the Name box to type a unique name for the listener. The name can be up to 64 characters in length and can include letters, numbers, and the underscore character. Spaces are not allowed.
  4. Click the Listener Type down-arrow, and then select JMS.

Parameters tab

The Parameters tab changes to accommodate parameters for a JMS SIB listener. It is expected that you will have information from the WebSphere Application Server (WAS) administrator in order to correctly fill in the parameter values. The following describes the connection parameters to create a JMS SIB listener.

Parameter Description
JMS Provider Click the down arrow to specify the JMS Provider.

WebSphere - SIB: This option will require you to specify the JNDI registered names for the QueueConnectionFactory(QCF) and the Queue in the Queue Factory and the Queue Name fields respectively. You must also specify the SIB messaging endpoints.
WebSphere - SIB Direct: This option will require you to specify a value for the Bus Name and the Queue Name parameters as well as the SIB messaging endpoints.The destination queue is accessed directly without performing a JNDI lookup.
The following options don't require specification of a SIB Endpoint, so the Endpoint Information fields are hidden if they are selected:
NetWeaver: This option will required you to specify the JNDI registered names for the QueueConnectionFactory(QCF) and the Queue in the Queue Factory and the Queue Name fields respectively.
WebSphere - WMQ: Use this option to access a WebSphere WMQ queue as a JMS Destination. It will require you to specify the Queue Name of the target WebSphere MQ Queue.
Host Specify the hostname or IP address of the JMS Server. This information will be provided by your Application Server administrator.
Port Specify the TCP/IP port identifier that the JMS Server JNDI service (if applicable) or JMS Server has been configured to listen on. This information will be provided by your Application Server administrator.
Queue Factory Specify the JNDI registered name of the Queue Connection Factory. This information will be provided by your Application Server administrator.
Bus Name Only available for WebSphere - SIBDirect. This is the WebSphere SIB bus name that has been configured by your WAS administrator as the end point for SIB requests from the node. This information will be provided by your WAS administrator.
Queue Name Specify the JNDI registered name of the command queue. The Listener will read requests from this queue. The command queue information will be provided by your Application Server administrator.
Manager Only available for WebSphere - WMQ. This is the WebSphere MQ manager name. This will be provided by your WebSphere MQ administrator.
Channel Only available for WebSphere - WMQ. This is the WebSphere MQ Channel name. This will be provided by your WebSphere MQ administrator.
User Specify the the user ID that will be used to access the JMS server. This information will be provided by your Application Server administrator. Required for "WebSphere - MQ".
Password Specify the password associated with the user ID specified in the previous field. This information will be provided by your Application Server administrator. Required for "WebSphere - MQ".
Correlation ID This correlation ID value lets you get a particular message from a queue. The listener will only accept messages that contain the correlation ID value.
Extended Attributes Click this button to display the JMS Header Properties parameter. The parameter will override some of the default JMS header attributes such as persistence, priority and expiration on the reply message. Typically, these attributes are set to the values that were received in the JMS request header. For more information, see Extended attributes for the JMS listener .
Endpoints This set of fields is only visible when you select WebSphere - SIB or WebSphere - SIB Direct as the JMS Provider.
Host This is the hostname or IP address of the WebSphere SIB installation. This information will be provided by your WAS administrator.
Port This is the TCP/IP port identifier that the WebSphere SIB endpoint service is listening on. This information will be provided by your WAS administrator.
Defined Hosts This becomes the endpoint where the connections are made. You can add as many connection endpoints as required.
After you type the host name or IP address and port number, click Add. The combined endpoint host and port are added to the Defined Hosts box. For example: sib-node01.acme.com:7276
Controlled Listener Select this check box to enable the listener to be controlled by the Get Message From Controlled Listener action.

The Get Message From Controlled Listener action determines when the listener should get the next request from the remote queue. Controlled Listener check box works in conjunction with the Delay (seconds) parameter (next).
Delay (seconds) Works in conjunction with Controlled Listener parameter (previous).
Once the listener receives the request from the Get Message From Controlled Listener action, it checks the remote queue for the next request. If no request is available, the listener waits the seconds specified in Delay (seconds). If the request fails, a value is returned to the Get Message From Controlled Listener action indicating a timeout. For more information, see Creating a controlled listener .
Reply Select the check box to indicate a reply queue.

The node will place all responses on this queue. However, if the enterprise application specifies a different reply queue, that reply queue will override the reply queue specified here. The reply queue information will be provided by your WAS administrator.
Related topics

Listener Payload tab

Listener Mapping Log tab

Extended attributes for the JMS listener

What's Inside