Gets the object from the last received message.
Jms.bdh
JmsGetMessageObject(): string;
Returns the handle of the object sent with the message.
transaction TExampleSendReceiveObjectMessage var hObject : number; hObjectReturned : number; sReturnType : number; begin JavaCallMethod(ghJmsSampleObj, "generateObject"); hObject := JavaGetObject(ghJmsSampleObj); JmsClearMessage(); JmsSendObjectMessage(hObject, csQueue); sReturnType := JmsReceiveMessage(csQueue, -1); if (sReturnType = JMS_MSG_TYPE_OBJECT) then hObjectReturned := JmsGetMessageObject(); JavaCastObject(hObjectReturned, "java/lang/Object"); JavaSetObject(ghJmsSampleObj, hObjectReturned); JavaCallMethod(ghJmsSampleObj, "handleObject"); else RepMessage("ObjectMessage expected!", SEVERITY_ERROR); end; end TExampleSendReceiveObjectMessage;
JmsSample.bdf, JmsSample.java