Kbase P105580: 4GL code example for using setStringProperty with the SonicMQ adapter
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  6/29/2005 |
|
Status: Unverified
GOAL:
4GL code example for using setStringProperty
GOAL:
Using the SonicMQ adapter
FACT(s) (Environment):
Progress 9.1x
FIX:
/* Publishes A Text message. */
DEFINE VARIABLE pubsubsession AS HANDLE.
DEFINE VARIABLE messageH AS HANDLE.
/* Creates a session object. */
RUN jms/pubsubsession.p PERSISTENT SET pubsubsession ("-H localhost -S 5162 ").
RUN setBrokerURL IN pubsubsession ("localhost:2506").
RUN beginSession IN pubsubsession.
/* Create a text message */
RUN createTextMessage IN pubsubsession (OUTPUT messageH).
RUN setText IN messageH ("Golf shoes on sale today").
/* set a StringProperty*/
RUN setStringProperty IN messageH ("test","test").
/* Publish the message on the "GolfTopic" topic */
RUN publish IN pubsubsession ("GolfTopic", messageH, ?, ?, ?).
RUN deleteMessage IN messageH.
RUN deleteSession IN pubsubsession.