Consultor Eletrônico



Kbase P49728: Is it possible to use the Progress Appserver as listener for
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   27/10/2003
Status: Unverified

GOAL:

Is it possible to use the Appserver as listener for SonicMQ messages

FACT(s) (Environment):

Progress 9.1D

FIX:

The SonicMQ 4GL Adapter is specially build to have a convenient way for
a 4GL application to communicate with SonicMQ via JMS. Like other 4GL
code you can also use code which is using the SonicMQ-4GL Adapter for running in the appserver.

This example code example shows an other way to communicate from a 4GL application to SonicMQ:

DEF VAR vres AS CHAR.
DEF VAR vall AS CHAR.
DEF VAR vinp AS CHAR INITIAL "test".
DEF VAR vcount AS INT INITIAL -4.
INPUT-OUTPUT THROUGH "sonic5" .
DO WHILE vcount < 7 :
IMPORT UNFORMATTED vres.
/*MESSAGE vres VIEW-AS ALERT-BOX.*/
vcount = vcount + 1 .
vall = vall + vres .
vinp = "test message " + STRING(vcount + 4) + " ".
PUT UNFORMATTED vinp SKIP.
END.

vall = vall + vres.
INPUT-OUTPUT CLOSE.
OUTPUT TO a_in_out_sonic_test.txt.
PUT UNFORMATTED vall.
OUTPUT CLOSE.