JmsGetMessageHandle Function

Action

Gets the handle of the received message.

Include file

Jms.bdh

Syntax

JmsGetMessageHandle(): number;

Return value

Returns the handle of the received message.

Example

  transaction TExampleHandleUnknownMessage
  var ret : number;
      sMessage : string;
      hObj : number;
      hHandle:number;
  begin
    JmsSendTextMessage("Text message!", csQueue, "ExampleHandleUnknownMessage_Send");
    ret := JmsReceiveMessage(csQueue, -1, "ExampleHandleUnknownMessage_Receive");
    if ret = JMS_MSG_TYPE_TEXT then
       sMessage := JmsGetMessageText();
    elseif ret = JMS_MSG_TYPE_OBJECT then
       hObj := JmsGetMessageObject();              
    elseif ret = JMS_TIMEOUT then
      RepMessage("Timeout", SEVERITY_INFORMATIONAL);
    elseif ret = JMS_UNKNOWN then
      RepMessage("Unknown return value!", SEVERITY_ERROR);
    else 
      hHandle := JmsGetMessageHandle();
    end;
  end TExampleHandleUnknownMessage;

Sample scripts

JmsSample.bdf, JmsSample.java