![]()
8.6.4 Configuring listener ports
As discussed in 8.4.7, Associating a message-driven bean with a destination, a listener port is used to associate a message-driven bean with a connection factory and a destination for the WebSphere MQ JMS provider. A listener must be defined on the appserver on which the message-driven application will be installed. To configure a listener port...
1. In the navigation tree, expand Servers.
2. Click Application servers.
3. A list of the appservers defined within the cell will be displayed. This is shown in Figure 8-41.
![]()
Figure 8-41 Application servers defined within the cell
4. Click the appserver on which to create the listener port.
5. The configuration properties for the appserver will be displayed. In the Communications section, expand Messaging.
6. Click Message Listener Service, as shown in Figure 8-42.
![]()
Figure 8-42 Message listener service link
7. The configuration properties for the message listener service will be displayed.
8. Click Listener Ports. A list of listener ports that are currently defined for this appserver will be displayed. This is shown in Figure 8-43.
![]()
Figure 8-43 Listener ports
In this example, we already have one listener port defined, called BankListenerPort.
9. To create a new listener port, click New. Alternatively, to change the properties of an existing listener port, click one of the listener ports displayed. Figure 8-44 shows the configuration page for the BankListenerPort object. Values must be specified for the Name, Initial State, Connection factory JNDI name, and Destination JNDI name properties.
![]()
Figure 8-44 Listener port properties
10. Enter the required configuration properties for the JMS activation specification.
11. Click OK.
12. Save the changes and synchronize them with the nodes.
13. For the changes to become effective, restart any appservers within the scope of the resources. Following our example, using the WebSphere MQ connection factory defined in WebSphere MQ connection factory configuration and the WebSphere MQ queue defined in WebSphere MQ queue destination configuration, we know that the BankMQJMSConnFactory object was bound into the JNDI name space with the name jms/BankJMSConnFactory. This JMS connection factory maps to a WebSphere MQ Queue Manager running on host kcgg1d6 and listening on port 1414. We also know that the BankMQJMSQueue object was bound into the JNDI name space with the name jms/BankJMSQueue. This JMS queue maps on to the BankJSQueue on this WebSphere MQ Queue Manager.
Therefore, if a message-driven bean is associated with this listener port, it would be invoked when messages arrived at the BankJSQueue destination on the WebSphere MQ Queue Manager listening on port 1414 of host kcgg1d6.