Valued Contributor.
Valued Contributor.

(SM) Support Tip: How to configure JNDI in MQ for CIT use

1. Follow the steps below to configure .bindings file in JMS
    1). Create a directory in which the .bindingsfile can be saved in any location of your computer. In this example, a directory named jndidirectory will be created in the folder.
    2). Open MQ, and click JMS Administered Objects, and then click Add Initial Context.
    3). Select the File systemoption in the Connection Details wizard as shown below. Enter file:C/jndidirectory in the Context nickname Leave the default values unchanged for other fields and complete running the wizard. The new file initial context will be displayed in the left navigator under JMS Administered Objects.
    4). Click on the file initial context (named file:C/jndidirectoryin this example) in the navigator to expand it. Right-click on Connection Factories, move the cursor to New, and then click Connection Factory. Enter the name of the connection factory as MyQueueConnectionFactory. Select Queue Connection Factory as the connection factory type. Leave the default values unchanged for other fields and complete running the wizard.
    5). Right-click on the newly connected connection factory in the left navigator, and click Properties. Then click Connectionand browse to select JMSDEMO as the Base queue manager. You can change the host and port name for the connection factory if required. No changes will be made in this example since the default values are used. Leave the default values unchanged for other fields and click OK.
    6). Right-click Destinationunder JMS Administered Objects in the left navigator. Move the cursor to New and then click Destination to open the New Destination In order to map the destination to the local queue you created, enter the same queue name (LocalQueue1 in this example) in the Name field. Select JMSDEMO as the queue manager and LocalQueue1 as the queue in the wizard. Leave the default values unchanged for other fields and complete running the wizard.

2. In JMS connector, in “Configure the connection to JNDI provider”, specify the following input
    Class: com.sun.jndi.fscontext.RefFSContextFactory
    URL: file:///<path_of_JNDI_folder>

3. In “Configure the connection to JMS server”, specify the following:
    Connection factory: <connection_factory_configured_in_step1>
    Destination: <destination_configured_in_step1>
    Connection identifier: Admin

4. In “configure the JVM”, add the following .jar including the path(under <JMS_HOME>/java/lib) in class path:

Labels (1)
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.