Consultor Eletrônico



Kbase 19937: Error 4122 with Asynchronous AppServer
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   15/09/2008
Status: Verified

FACT(s) (Environment):

Progress 9.1x

SYMPTOM(s):

Invalid widget handle used in WAIT-FOR statement. WAIT-FOR terminated. (4122)

CAUSE:

When running asynchronous requests to the Progress AppServer, programmers must be cautious when cleaning up asynchronous handles. If the blocking statement used with the call to the AppServer is for PROCEDURE-COMPLETE of the handle and the code to clean up the handle is placed in the EVENT-PROCEDURE, the above error will result.

The following pseudo code demonstrates a call to the AppServer with the delete object in the EVENT-PROCEDURE:

RUN serverproc.p ON s-hndl ASYNCHRONOUS SET a-hndl
EVENT-PROCEDURE "eproc1" (INPUT x, OUTPUT y as CHAR).

WAIT-FOR PROCEDURE-COMPLETE OF a-hndl.

PROCEDURE eproc1:
DEFINE INPUT PARAMETER y AS CHAR.
DISPLAY y.
DELETE OBJECT a-hndl.
END.

FIX:

Place the DELETE OBJECT statement outside of the
EVENT-PROCEDURE but after the WAIT-FOR statement.