You must set up the JNDI environment before you can run the JMSHeader node sample.
The necessary queues are created automatically by the sample.
Complete the following steps to create the JNDI objects that are required to run the
JMS Coordinated Request-Reply sample.
Use the jms.defs file that is provided in the sample.
On Windows
Run the JNDI setup after importing, or importing and deploying the sample
but before running the sample flow:
Open the mq_install_path\Java\bin\JMSAdmin.config file, where
mq_install_path should be replaced with the actual WebSphere MQ install location.
In the JMSAdmin.config file ensure that the following name-value pairs are defined:
Ensure that the jms.defs file that
is provided with the sample contains the correct queue manager name and port number.
In the Application Development view, expand the JMS Header Node integration project.
Open the Other Resources directory and double-click
jms.defs to open the file for editing.
If you are using the default queue manager and port, QMANAGER must have a value of IB9NODE
and PORT must have a value of 2414.
If you are using a different queue manager or port,
edit the values for QMANAGER or PORT and save your changes.
Run the following command, where:
mq_install_path should be replaced with the actual install
location of WebSphere MQ
toolkit_workspace_path should be replaced with the
path to the IBM Integration Toolkit's workspace; for example, C:\Users\user_id\IBM\IntegrationToolkit\workspace:
Note: On Windows you will need to enclose the command in quotes if
there are spaces in the paths, as shown in the example above.
If any error messages are returned on the command line during the creation of the JNDI objects in the
.bindings file, delete the .bindings
file from the C:\JNDI-Directory
and run the previous command again.
On UNIX
Run the JNDI setup before deploying the sample flow:
Open the mq_install_path/java/bin/JMSAdmin.config file, where
mq_install_path should be replaced with the actual WebSphere MQ install location.
In the JMSAdmin.config file ensure that the following name-value pairs are defined:
Under /home/username,
create a folder named JNDI-Directory.
Ensure that the jms.defs file that is provided with the sample contains
the correct queue manager name and port number.
In the Application Development view, expand the JMS Header Node Message Flows project.
Open the Other Resources directory and double-click
jms.defs to open the file for editing.
If you are using the default queue manager and port, QMANAGER must have a value of IB9QMGR
and PORT must have a value of 2414.
If you are using a different queue manager or port,
edit the values for QMANAGER or PORT and save your changes.
Run the following command, where:
mq_install_path should be replaced with the actual install
location of WebSphere MQ
toolkit_workspace_path should be replaced with the
path to the IBM Integration Toolkit's workspace; for example, /home/user_id/IBM/IntegrationToolkit/workspace:
cd mq_install_path/java/bin
. ./setjmsenv
Running the setjmsenv command sets up the JMS environment and adds
com.ibm.mqjms.jar to the CLASSPATH. Java is required by JMSAdmin and if it is not already set in your
PATH it can be added with the following command, where JAVA_HOME is the install location of Java:
Note: On Unix you will need to enclose the command in quotation marks (") around the project folder name
because it has spaces, as shown above.
If any errors occur during the creation of the JNDI objects in the
.bindings file, delete the .bindings file from the
/home/username/JNDI-Directory and run the previous command again.
Ensure that JAVA_HOME/bin has been added to your PATH, where
JAVA_HOME is the install location of Java.
A sample broker archive (BAR) file (JMSCoordinatedRequestReplyUnix.bar) is provided
with the sample, where the user name is db2admin.
On z/OS
Run the JNDI setup before deploying the sample flow:
Open the mq_install_path/Java/bin/JMSAdmin.config file, where
mq_install_path should be replaced with the actual WebSphere MQ install location.
In the JMSAdmin.config file ensure that the following name-value pairs are defined:
In the jms_zOS.defs file,
ensure that the transport type is named BINDINGS for z/OS.
If any errors occur during the creation of the JNDI objects in the
.bindings file, delete the .bindings file from the
/home/username/JNDI-Directory and run the previous command again.
A sample broker archive (BAR) file (JMSCoordinatedRequestReplyUnix.bar) is provided
with the sample, where the user name is db2admin.