Gets the listener of the given destination.
Jms.bdh
JmsGetConsumerMessageListener( in sJndiDestinationName : string ): number;
Parameter | Description |
---|---|
sJndiDestinationName | The destination for which we want to attach the listener |
Returns the handle of the given destination's listener.
transaction TExampleGetMessageAsynchronously var hHandle : number; begin JavaCallMethod(ghJmsSampleObj, "getMessageListener"); hHandle := JavaGetObject(ghJmsSampleObj); JmsSetConsumerMessageListener(csQueue, hHandle); JmsClearMessage(); JmsSendTextMessage("Text message 1 for the message listener!", csQueue); JmsSendTextMessage("Text message 2 for the message listener!", csQueue); JmsSendTextMessage("Text message 3 for the message listener!", csQueue); if (JmsGetConsumerMessageListener(csQueue) = 0) then RepMessage("No message listener set for " + csQueue, SEVERITY_WARNING); else // We have to wait for the 3 messages to get to the listener Wait 5.0; end; end TExampleGetMessageAsynchronously;
JmsSample.bdf, JmsSample.java