Hi Jim,
a .bindings file is a source of information for JNDI. JNDI is a Java Directory Interface which provides an API for getting information from a standard place in a standard way via a standardized API. It is needed for both client and server bindings to the QM by the Java JMS application.
The queue manager generally doesn't need special configuration for JMS connections. You just need the normal permissions, and channels if there's a client connecting.
There are a couple of JNDI providers available, but the classic one which uses a ,bindings file is the Sun Reference File System JNDI Provider.
IBM Provides several tools which can be used to create content in a JNDI directory using the API. If you configure these tools to use the SunFSRefAPI implementation they will create a .bindings file for you.
I strongly recommend this approach over trying to use a text file editor to modify a .bindings file.
The .bindings file (or other JNDI data source) generally provides 2 different types of information. First, it provides the Connection Factory information. This can be for client or server bindings.
Then it provides destination information. Destinations can be either queues or topics. JMS doesn't care quite as much as MQ does about the distinction.
There is a command line JMSAdmin tool. You have to configure it using a config file before it will run effectively. The provider class and information on the base directory (that will contain the .bindings file) have to be configured in the file. There's a pretty good write up for JMSAdmin usage at
https://www.ibm.com/support/pages/detailed-example-running-jmsadmin-mq-71-75-and-80-unix. It's a bit out of date from a version perspective, but I think it all still applies.
The manuals link for newer versions is:
https://www.ibm.com/support/knowledgecenter/SSFKSJ_9.2.0/com.ibm.mq.con.doc/q123270_.htmlOn my system, JMSAdmin is at path /opt/mqm/java/bin/JMSAdmin.
The default provider in the JMSAdmin.config file is now the file system provider, which makes like easier. That wasn't always the case. You will have to changed the default file location in the PROVIDER_URL though.
Once you have the JMSAdmin tool running, you can create a connection factory and then some destinations. JMS Connection Factories map to MQ queue managers (basically) and provide information on how to connect. JMS destinations map onto MQ Queues or Topics.
Good luck with it.
Regards,
------------------------------
Neil Casey
Senior Consultant
Syntegrity Solutions
Melbourne, Victoria
IBM Champion (Cloud) 2019-20
+61 (0) 414 615 334
------------------------------
Original Message:
Sent: Tue December 01, 2020 08:11 PM
From: Jim Creasman
Subject: JMS .bindings file
BTW, meant to add that the .bindings file is intended for establishing a JMS connection to an MQ topic (not queue). Most of the examples seem to show how to connect with a queue, instead.
------------------------------
Jim Creasman
Original Message:
Sent: Tue December 01, 2020 11:20 AM
From: Jim Creasman
Subject: JMS .bindings file
I have a running MQ server and need to create a bindings file for a new client connection that is using JMS. This is our first time using a JMS client connection. Our other clients are NodeJS using either AMQP or IBM MQI. I have a few questions.
- What is the purpose of the .bindings file? Is this needed only for client, or for both client and server?
- Does any of the configuration on the existing MQ server need to be changed or updated for this?
- Is there a good site that documents the steps for creating this file from command line on Linux MQ installation?
- Is there a sample .bindings file that I can simply edit with existing server info to provide to clients?
Thanks,
Jim
------------------------------
Jim Creasman
------------------------------