Creating a .bindings file for Windows
To configure the IBM® Product Master GDS IBM MQ settings, you need to create a .bindings file.
About this task
Procedure
- Set up the IBM MQ class path. The IBM MQ default installation directory is at C:\Program Files\IBM\IBM MQIBM MQ in Windows that should be set as
MQ_INSTALL_DIR
. Assuming you must update the system class path variable (CLASSPATH) with the following JAR files:- <MQ_INSTALL_DIR>\Java\lib\providerutil.jar
- <MQ_INSTALL_DIR>\Java\lib\com.ibm.mqjms.jar
- <MQ_INSTALL_DIR>\Java\lib\ldap.jar
- <MQ_INSTALL_DIR>\Java\lib\jta.jar
- <MQ_INSTALL_DIR>\Java\lib\jndi.jar
- <MQ_INSTALL_DIR>\Java\lib\jms.jar
- <MQ_INSTALL_DIR>\Java\lib\connector.jar
- <MQ_INSTALL_DIR>\Java\lib\fscontext.jar
- <MQ_INSTALL_DIR>\Java\lib\com.ibm.mq.jar
- Create a directory on the IBM MQ server and call it:
C:\JNDI-Directory
.Note: If this directory exists, delete any earlier versions of the .bindings files from it. - Go to the <MQ_INSTALL_DIR>\Java\bin directory
and add the following changes to the JMSAdmin.config file.
Ensure that the values for the following parameters are:
- INITIAL_CONTEXT_FACTORY=com.sun.jndi.fscontext.RefFSContextFactory
- PROVIDER_URL=file:/C:/JNDI-Directory
Note: If these parameters are not present, include these parameters with the previous values. - Open a command prompt and change the directory to
<MQ_INSTALL_DIR>\Java\bin
. Issue theJMSAdmin.bat
file. On successful initialization of this batch file, you see aInitCtx>
prompt. You are now ready to run the MQSC commands.If an exception occurs, then check whether the class path system variable is properly set for the JAR files that are listed in step 1 previously. - Run the following commands in the sequence:
InitCtx> def q(INBOUND_QUEUE_NAME)
InitCtx> def q(OUTBOUND_QUEUE_NAME)
InitCtx> def qcf(QUEUE_CONNECTION_FACTORY_NAME)transport(CLIENT)channel(java.channel)host(WMQ_SERVER_IP)port(WMQ_SERVER_DEFINED_PORT)qmgr(QUEUE_MANAGER_NAME) InitCtx> endFor example:
Where:InitCtx> def q(XML_IN) InitCtx> def q(XML_OUT) InitCtx> def qcf(ptpQcf) transport(CLIENT) channel(java.channel)host(9.121.222.84) port(1414) qmgr(bcg.queue.manager) InitCtx> end
- XML_IN
- The inbound queue that is used by the GDS messaging service to read from.
- XML_OUT
- The outbound queue to which GDS posts messages.
- ptpQcf
- The queue connection factory name as defined in
$TOP/bin/conf/env_settings.ini as a value for the
queue_connection_factory parameter under the
[gds]
section. - 9.121.222.84
- The IBM MQ server IP address.
- 1414
- The IBM MQ server that is defined listen port.
- bcg.queue.manager
- The queue manager name under which the queues are defined.
Note: If you receive a message similar to unable to bind object message, check whether the JNDI-Directory directory exists. Also, if there is already an earlier version of the .bindings file in the folder, delete it and redo steps 4 and 5 previously. - Copy the generated .bindings file from the JNDI-Directory directory and paste the file to the required destination at Product Master under the $TOP/etc/default/ folder.