IBM MQ create .binding file

The IBM JMSAdmin tool can be used to create the .binding file that can be used to connect to the IBM MQ Server.

Following are the steps to create the binding file:

  • Download and install the IBM MQ or atleast following jar files are required to use the JMSAdmin tool. Basically all of the following needs to be in your CLASSPATH enviornment variable.
C:\Dev\sw\IBM\WebSphere MQ\Java\lib;;C:\Dev\sw\IBM\WebSphere MQ\Java\lib\;;C:\Dev\sw\IBM\WebSphere MQ\Java\lib\;C:\Dev\sw\IBM\WebSphere MQ\Java\lib\jms.jar;C:\Dev\sw\IBM\WebSphere MQ\Java\lib\jndi.jar;;C:\Dev\sw\IBM\WebSphere MQ\Java\lib\;;C:\Dev\sw\IBM\WebSphere MQ\Java\lib\;;C:\Dev\sw\IBM\WebSphere MQ\Java\lib\jndi.jar;;C:\Dev\sw\IBM\WebSphere MQ\Java\lib\providerutil.jar;;C:\Dev\sw\IBM\WebSphere MQ\Java\lib\connector.jar;;C:\Dev\sw\IBM\WebSphere MQ\Java\lib\fscontext.jar;;C:\Dev\sw\IBM\WebSphere MQ\Java\lib\ldap.jar;

If you dont have rights to modify the PATH variable set it in command prompt for the current session 🙂

set CLASSPATH=%CLASSPATH%;C:\Dev\sw\IBM\WebSphere MQ\Java\lib\providerutil.jar;

Following in PATH varaible
;C:\Dev\sw\IBM\WebSphere MQ\Java\lib; C:\Dev\sw\IBM\WebSphere MQ\Java\lib\;;C:\Dev\sw\IBM\WebSphere MQ\Java\bin
  • Create a JMSAdmin.config file and following should be added to it
#Directory where binding is created
PROVIDER_URL=file:/C:/Dev/sw/IBM/WebSphere MQ/Java/binding
  • Cretae intsetup file and add following contents basically define the IBM MQ connection
def qcf(ivtQCF) qmgr(QMGR) transport(CLIENT) host( channel(QMGRChannel) port(2222) DEFINE Q(OUTQ) QUEUE(OUTQ) TC(MQ) end
  • Run the admin tool
java < intsetup.scp
  • The binding file is created
  • In case you change any configuations always delete the .binding file and run the above command again

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s