要创建 JMS 绑定文件,请您使用 JMSAdmin 应用程序。本节提供了如何创建 JMS 绑定文件的摘要。获取如何使用 JMSAdmin 应用程序的完整信息,参阅您的 WebSphere MQ 文档。
下列步骤描述了如何创建 JMS 绑定文件:
JMSAdmin
def ctx(contextName)
chg ctx(contextName)
其中 contextName 是您在前一步里创建的上下文。
def qcf(connectionFactoryName) qmgr (queueManagerName) tran(client) chan(javaChannelName) host (MQHostName) port (MQport)
其中:
def q(queueAliasName) qmgr (queueManagerName) queue (queueName)
end
绑定文件在 JMSAdmin.config 文件 PROVIDER_URL 字段中配置的文件夹的子文件夹中创建。该绑定文件的名称如下:
.bindings
子文件夹名称就是您为 JMS 上下文选择的名称。
图 32 显示了样本 JMS 配置的创建。
def ctx(JMS) change ctx(JMS)
define qcf(WBICHub) qmgr(bcg.queue.manager) tran(CLIENT) chan(java.channel) host(127.0.0.1) port(1414)
define q(inQ) queue (JMSIN) qmgr(bcg.queue.manager) define q(outQ) queue (JMSOUT) qmgr(bcg.queue.manager)
图 32 中从 JMSAdmin 应用程序发出的命令创建了下列 JMS 对象:
当这些命令完成后,JMSAdmin 应用程序已经在下列目录中创建一个 .bindings 文件:
C:/filesender/config/jms