Forum Post: RE: Asynchronous app server call, won't fires EVENT-PROCEDURE

Status
Not open for further replies.
F

Frank Meulblok

Guest
One thing that does stand out: in this part of the code you're disconnecting the AppServer without checking if the async requests completed or not. ... CREATE SERVER hServer. hServer:CONNECT("-H myservre.com -DirectConnect -S 3090 -AppService schAS1 -sessionModel Session-free"). IF tASync THEN DO: RUN test.p ON SERVER hServer ASYNCHRONOUS SET hAsync EVENT-PROCEDURE "AsyncProcessor" IN this-procedure (rtipo, fEcho, fPausa, OUTPUT pStatus ) . END. ELSE DO: ... END. hServer:DISCONNECT (). DELETE OBJECT hServer. That's not a good idea. Try moving the code that connects to and disconnect from the appserver outside of that trigger block, and into a wider scope - I don't see any reason not to persist the connection in between requests in this case.

Continue reading...
 
Status
Not open for further replies.
Top