Installing an Instance of MQ
This section shows you how to create Listener, Channel, Queues and JMS Bindings on the MQ server with the user mqm.
Creating Listener, Channel and Queues
To create the queue manager MQT24, Channel and Queues, execute the command below from the <TAFJ_HOME>/AppServer/MQ/ directory.
. ./MQCommand
WebSphere MQ queue manager created. Directory '/var/mqm/qmgrs/MQT24' created. The queue manager is associated with installation 'Installation1'. Creating or replacing default objects for queue manager 'MQT24'. Default objects statistics : 74 created. 0 replaced. 0 failed. Completing setup. Setup completed. WebSphere MQ queue manager 'MQT24' starting. The queue manager is associated with installation 'Installation1'. 5 log records accessed on queue manager 'MQT24' during the log replay phase. Log replay for queue manager 'MQT24' complete. Transaction manager state recovered for queue manager 'MQT24'. WebSphere MQ queue manager 'MQT24' started using V8.0.0.4. 5724-H72 (C) Copyright IBM Corp. 1994, 2011. ALL RIGHTS RESERVED. Starting MQSC for queue manager MQT24. 1 : DEFINE LISTENER('LISTENER.TCP') TRPTYPE(TCP) PORT(1414) CONTROL(QMGR) AMQ8626: WebSphere MQ listener created. 2 : START LISTENER('LISTENER.TCP') AMQ8021: Request to start WebSphere MQ listener accepted. 3 : DEFINE CHANNEL('SYSTEM.ADMIN.SVRCONN') CHLTYPE(SVRCONN) AMQ8014: WebSphere MQ channel created. 4 : DEFINE CHANNEL('T24_CHANNEL') CHLTYPE(SVRCONN) AMQ8014: WebSphere MQ channel created. 5 : ALTER QMGR CHLAUTH(DISABLED) AMQ8005: WebSphere MQ queue manager changed. : 6 : DEFINE QLOCAL('T24.OFS.QUEUE') DEFPSIST(YES) SHARE AMQ8006: WebSphere MQ queue created. 7 : DEFINE QLOCAL('T24.OFS.REPLY.QUEUE') DEFPSIST(YES) SHARE AMQ8006: WebSphere MQ queue created. : 8 : DEFINE QLOCAL('T24.BROWSER.QUEUE') DEFPSIST(YES) SHARE AMQ8006: WebSphere MQ queue created. 9 : DEFINE QLOCAL('T24.BROWSER.REPLY.QUEUE') DEFPSIST(YES) SHARE AMQ8006: WebSphere MQ queue created. : 10 : DEFINE QLOCAL('T24.ARC.MOBILE.QUEUE') DEFPSIST(YES) SHARE AMQ8006: WebSphere MQ queue created. 11 : DEFINE QLOCAL('T24.ARC.MOBILE.REPLY.QUEUE') DEFPSIST(YES) SHARE AMQ8006: WebSphere MQ queue created. : 12 : DEFINE QLOCAL('T24.TWS.QUEUE') DEFPSIST(YES) SHARE AMQ8006: WebSphere MQ queue created. 13 : DEFINE QLOCAL('T24.TWS.REPLY.QUEUE') DEFPSIST(YES) SHARE AMQ8006: WebSphere MQ queue created. : 14 : DEFINE QLOCAL('T24.TCIB.QUEUE') DEFPSIST(YES) SHARE AMQ8006: WebSphere MQ queue created. 15 : DEFINE QLOCAL('T24.TCIB.REPLY.QUEUE') DEFPSIST(YES) SHARE AMQ8006: WebSphere MQ queue created. : 16 : DEFINE QLOCAL('T24.TCIB.CORP.QUEUE') DEFPSIST(YES) SHARE AMQ8006: WebSphere MQ queue created. 17 : DEFINE QLOCAL('T24.TCIB.CORP.REPLY.QUEUE') DEFPSIST(YES) SHARE AMQ8006: WebSphere MQ queue created. : 18 : DEFINE QLOCAL('T24.TCIB.WEALTH.QUEUE') DEFPSIST(YES) SHARE AMQ8006: WebSphere MQ queue created. 19 : DEFINE QLOCAL('T24.TCIB.WEALTH.REPLY.QUEUE') DEFPSIST(YES) SHARE AMQ8006: WebSphere MQ queue created. : 20 : DEFINE QLOCAL('T24.CALLAT.QUEUE') DEFPSIST(YES) SHARE AMQ8006: WebSphere MQ queue created. 21 : DEFINE QLOCAL('T24.CALLAT.REPLY.QUEUE') DEFPSIST(YES) SHARE AMQ8006: WebSphere MQ queue created. : 22 : DEFINE QLOCAL('T24.SEAT.QUEUE') DEFPSIST(YES) SHARE AMQ8006: WebSphere MQ queue created. 23 : DEFINE QLOCAL('T24.SEAT.REPLY.QUEUE') DEFPSIST(YES) SHARE AMQ8006: WebSphere MQ queue created. : 24 : DEFINE QLOCAL('T24.IF.OUTBOUND.QUEUE') DEFPSIST(YES) SHARE AMQ8006: WebSphere MQ queue created. 25 : DEFINE QLOCAL('T24.IF.INBOUND.REPLY.QUEUE') DEFPSIST(YES) SHARE AMQ8006: WebSphere MQ queue created. : 26 : DEFINE TOPIC('T24.EVENTS.TOPIC') TOPICSTR('/') AMQ8690: WebSphere MQ topic created. : 26 MQSC commands read. No commands have a syntax error. All valid MQSC commands were processed.
Creating Java Message Service Bindings
You need to create bindings for application server (except WebSphere Application Server or JBoss 6EAP when using transport mode CLIENT) to connect to WebSphere MQ.
Create a simple file based Java Naming and Directory Interface (JNDI) context and configure the JMS objects in that JNDI namespace. These JNDI objects are used by application server to connect to the WebSphere MQ queue manager. The bindings file should be copied to each server, which is running the application server.

To setup the PROVIDER_URL with the User mqm,
- Create a directory by using the command below to generate the binding file.
mkdir /home/Temenos/MQ-JNDI
- Edit the <TAFJ_HOME>/AppServer/MQ/JMSAdmin.config file to point its directory in the PROVIDER_URL property.
- Set up the PROVIDER_URL and replace the values as follows:
For Windows,
INITIAL_CONTEXT_FACTORY=com.sun.jndi.fscontext.RefFSContextFactory PROVIDER_URL=file:/C:/Temenos/MQ-JNDI SECURITY_AUTHENTICATION=none
For Linux or Unix,
INITIAL_CONTEXT_FACTORY=com.sun.jndi.fscontext.RefFSContextFactory PROVIDER_URL=file:///home/Temenos/MQ-JNDI SECURITY_AUTHENTICATION=none

Open the file <TAFJ_HOME>/AppServer/MQ/MQBinding and setup the java path of MQ as shown below.
MQ_JAVA_INSTALL_PATH=[path_to java_MQ]
- Windows: MQ_JAVA_INSTALL_PATH=”C:\Program Files\IBM\WebSphere MQ\java”
- Linux or Unix: MQ_JAVA_INSTALL_PATH=/opt/mqm/java

Open the file <TAFJ_HOME>/AppServer/MQ/t24Bind and modify the existing IP with the IP address of the MQ Server.
def xaqcf(MQConnectionFactory) transport(CLIENT) channel(T24_CHANNEL) host([ip]) port(1414) qmgr(MQT24)
def xaqcf(MQConnectionFactory) transport(CLIENT) channel(T24_CHANNEL) host(10.9.237.185) port(1414) qmgr(MQT24)

Use the ./MQBindings command to generate the JMS binding.
Licensed Materials - Property of IBM 5724-H72, 5655-R36, 5724-L26, 5655-L82 (c) Copyright IBM Corp. 2008, 2011 All Rights Reserved. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. Starting WebSphere MQ classes for Java(tm) Message Service Administration InitCtx> InitCtx> InitCtx> InitCtx> InitCtx> InitCtx> InitCtx> … InitCtx> InitCtx> InitCtx> InitCtx> Stopping WebSphere MQ classes for Java(tm) Message Service Administration
The .bindings file gets created in the PROVIDER_URL folder.
In this topic