Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.1 (中文) » QAnywhere » 连接器


向 JMS 连接器发送 QAnywhere 消息

通过将地址设置为下列值,QAnywhere 客户端可向 JMS 系统发送消息:


connector-address 是连接器属性 ianywhere.connector.address 的值,而 JMS-queue-name 是通过 Java 命名和目录接口来查找 JMS 队列或主题的名称。

如果 JMS-queue-name 包含反斜线,则必须使用另一个反斜线来转义此反斜线。例如,上下文 ss 中名为 qq 的队列应指定为 ss\\qq

// C# example 
QAMessage msg; QAManager mgr;
... mgr.PutMessage( @"ianywhere.connector.wsmqfs\ss\\qq",msg
// C++ example
QAManagerBase *mgr; QATextMessage *msg; ... mgr->putMessage(
"ianywhere.connector.easerver\\ss\\\\qq", msg );

例如,如果将 ianywhere.connector.address 设置为 ianywhere.connector.easerver,将 JMS 队列名称设置为 myqueue,则设置该地址的代码将如下所示:

// C# example 
QAManagerBase mgr; QAMessage msg; // Initialize the manager. ... msg =
mgr.CreateTextMessage(); // Set the message content. ...
mgr.PutMessage(@"ianywhere.connector.easerver\myqueue", msg );
// C++ example
QAManagerBase *mgr; QATextMessage *msg; // Initialize the manager. ... msg =
mgr.createTextMessage(); // Set the message content. ... mgr->putMessage(
"ianywhere.connector.easerver\\myqueue", msg );