Configuring WebSphere connectivity with Integrator
The Integrator JMS Connector requires access to WebSphere queues in read, deposit, receive and send modes. Use the WebSphere MQExplorer application to create dedicated in and out queues.
Create two queues (suggested naming):
Integrator uses the Java Naming and Directory Interface (JNDI) to interrogate a naming service in order to obtain references to the administered objects, JMS connection factory and JMS destination.
JNDI administered objects are stored in bindings. Binding can be either:
For the examples in this documentation, we create a file-system based binding.
For a description of LDAP based binding, view the dedicated topic.
To create the binding, use the WebSphere JMSAdmin utility located in the directory <WebSphereMQ install directory>/java/bin.
JMSAdmin uses the WebSphere configuration file JMSAdmin.config located in the same directory as the utility. JMSAdmin.config, provides information for distributed application components which cannot locate one another and, as a result, cannot otherwise work together.
To edit JMSAdmin.config, log on as root user.
Uncomment the two lines indicated in blue text below. These lines describe the JNDI properties related to MQSeries connectivity:
#The following line specifies which JNDI service provider is in use. #INITIAL_CONTEXT_FACTORY=com.sun.jndi.ldap.LdapCtxFactory INITIAL_CONTEXT_FACTORY=com.sun.jndi.fscontext.RefFSContextFactory #INITIAL_CONTEXT_FACTORY=com.ibm.ejs.ns.jndi.CNInitialContextFactory #INITIAL_CONTEXT_FACTORY=com.ibm.websphere.naming.WsnInitialContextFactory # The following line specifies the URL of the service provider's initial context. #PROVIDER_URL=ldap://polaris/o=ibm,c=us PROVIDER_URL=file:/<WebSphereMQ_Installation_Path>/Java/JNDI #PROVIDER_URL=iiop://localhost/ |
After you edit this file, the JNDI service is no longer provided by LDAP and now requires a .bindings file for registry information.
To use JMS, JNDI looks up two object types:
Execute JMSAdmin.bat:
5724-H72, 5655-L82, 5724-L26 (c) Copyright IBM Corp. 2002,2005. All Rights Reserved.
Starting Websphere MQ classes for Java(tm) Message Service Administration
DEFINE A QUEUE CONNECTION FACTORY LINKED TO A HOST, A PORT AND A QUEUE MANAGER InitCtx> DEFINE QCF(MYQCF) HOSTNAME(172.23.xxx.xxx) PORT(1414) TRANSPORT(client) QMANAGER(QM_swift_saa) CHANNEL(SYSTEM.DEF.SVRCONN)
DEFINE QUEUES LINKED TO QUEUE MANAGER; SPECIFY THAT QUEUE IS NOT A JMS APPLICATION InitCtx> DEFINE Q(TEST_IN) QMANAGER(QM_swift_saa) QUEUE(TEST_IN) TC(MQ) InitCtx> DEFINE Q(TEST_OUT) QMANAGER(QM_swift_saa) QUEUE(TEST_OUT) TC(MQ)
InitCtx> end |
JMSAdmin.bat creates:
To enable Integrator Server to use the MQSeries queues, copy the .bindings file to a user directory. For example: <Integrator Server installation directory>/JNDI.
The transfer of the .bindings file to Integrator Server must be done in ASCII mode because it is a text file.