Consultor Eletrônico



Kbase P88633: When an AppServer hits a STOP condition, then the STOP condition is sent back to the client
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   23/07/2004
Status: Unverified

GOAL:

What happens to a client session when an AppServer that is running a procedure on its behalf is hitting a STOP condition?

FIX:

The following code shows that the STOP condition is returned to the client (raised on the client side):
/* RunSomethingOnAS.p */
DEFINE VARIABLE sh AS HANDLE NO-UNDO.
CREATE SERVER sh.
sh:CONNECT("-AppService sports2000").

DEFINE VARIABLE c AS CHARACTER NO-UNDO.

DO ON STOP UNDO, RETRY:
IF RETRY THEN DO:
MESSAGE "The AppServer has hit a STOP condition"
VIEW-AS ALERT-BOX INFO BUTTONS OK.
RETURN ERROR "AppServer exited with STOP".
END.
RUN testAS.p ON SERVER sh (OUTPUT c).
MESSAGE c VIEW-AS ALERT-BOX INFO BUTTONS OK.
END.


/* testAs.p (a separate external procedure) */
DEFINE OUTPUT PARAMETER c AS CHARACTER NO-UNDO.

STOP.
c = "Hello world".