JMS 客户端向 QAnywhere 客户端发送消息的方法是:将 JMS 消息属性 ias_ToAddress 设置为 QAnywhere 地址,然后将消息发送到与连接器属性 xjms.receiveDestination 对应的 JMS 目标。
请参见QAnywhere 消息地址。
例如,向 QAnywhere 地址 "qaddr" 发送消息(其中 xjms.receiveDestination 的连接器设置为 "qanywhere_receive"):
import javax.jms.*; try { QueueSession session; QueueSender sender; TextMessage mgr; Queue connectorQueue; // Initialize the session. connectorQueue = session.createQueue("qanywhere_receive"); sender = session.createSender( connectorQueue ); msg = session.createTextMessage(); msg.setStringProperty("ias_ToAddress", "qaddr"); // Set the message content. sender.send(msg); } catch( JMSException e ) { // Handle the exception. } |
将 JMS 消息映射到 QAnywhere 消息
JMS 属性
Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1 |