Configuring and Running JMS P2P and Pub/Sub Applications in WebSphere MQ, on Separate Hosts
deleeuw 120000DF98 Comments (2) Visits (5756)
If your goal is to configure a JMS sample on WebSphere MQ, there are several really useful articles and technotes published by IBM. However, in my case they were a little too simple, as they all run the client and server on the same host, using the same userid. In addition, at the time of writing there are a couple of typos in these documents which might trip you up.
The existing articles I found useful were:
None of the above references cover the scenario where the JMS client is on a separate host to the MQ Queue Manager. For that, follow my steps below (for Linux only), and note the additional steps which supplement the existing references:
1. Create user jmsuser1 in group jmsusers, on both client and server hosts.
2. Create a script to set up the MQ JMS environment as documented in reference #3 above. Do this on both client and server (queue manager). Execute the script in the profile of users mqm & jmsuser1 on the server, and jmsuser1 on the client.
Note: The jmsuser1 user is required because an mqm or root user on the client would be considered an administrative user by the queue manager, and would be denied remote access by default.
3. Create a new Queue Manager:
Note: The references above use the default channel. I preferred to create a new one to make the scenario more realistic.
6. Configure the queue manager to have a TCP/IP listener:
Note: This is required because the client needs to connect from a remote host.
Note: When creating the JMS Topic binding, do not enclose TOPIC1 in single quotes.
10. Copy the .bindings file from queue manager to the client host, in directory /var
Note: MQ supports LDAP and filesystem JNDI repositories. As I wanted to use filesystem, the .bindings file must be copied to each client host.
12. From the client machine, log in as jmuser1 and test the p2p and pub/sub samples as described in reference #3 above.
In summary, the following configurations were made in addition to those documented by the references above:
Adam de Leeuw (IBM Innovation Centre)