JmsSendTextMessage Function

Action

Sends a text message to the given destination.

Include file

Jms.bdh

Syntax

JmsSendTextMessage( in sMessage             : string,
                    in sJndiDestinationName : string, 
                    in sMeasure             : string optional );
Parameter Description
sMessage The text to send
sJndiDestinationName The destination of the message
sMeasurename (optional) The name of this measure. Default is the method name.

Example

transaction TExampleSendReceiveTextMessage
  var sRet : number;
      sMessage : string;
  begin
    JmsSendTextMessage("Welcome1!", csQueue);
    sRet := JmsReceiveMessage(csQueue, -1);
    if (sRet = JMS_MSG_TYPE_TEXT) then
      sMessage := JmsGetMessageText();
    else
      RepMessage("TextMessage expected!", SEVERITY_ERROR);
    end;      
  end TExampleSendReceiveTextMessage;  

Sample scripts

JmsSample.bdf, JmsSample.java