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 » Connectors » Sending a message from a JMS connector to a QAnywhere client


Addressing JMS messages meant for QAnywhere

A JMS client can send a message to a QAnywhere client by setting the JMS message property ias_ToAddress to the QAnywhere address, and then sending the message to the JMS Destination corresponding to the connector property xjms.receiveDestination.

See QAnywhere message addresses.


For example, to send a message to the QAnywhere address "qaddr" (where the connector setting of xjms.receiveDestination is "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.
catch( JMSException e ) {
    // Handle the exception.

Mapping JMS messages on to QAnywhere messages
JMS properties