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

SQL Anywhere 11.0.0 » QAnywhere » Creating QAnywhere Applications » Connectors


Sending a QAnywhere message to a JMS connector

A QAnywhere client can send a message to a JMS system by setting the address to the following value:


The connector-address is the value of the connector property ianywhere.connector.address, while JMS-queue-name is the name used to look up the JMS queue or topic using the Java Naming and Directory Interface.

If your JMS-queue-name contains a backslash, you must escape the backslash with another backslash. For example, a queue called qq in the context ss should be specified as 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 );

For example, if the ianywhere.connector.address is set to ianywhere.connector.easerver and the JMS queue name is myqueue, then the code to set the address would be:

// 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 );
See also