[progress Communities] [progress Openedge Abl] Forum Post: Killing A Persistent Procedure...

  • Thread starter Thread starter OctavioOlguin
  • Start date Start date
Status
Not open for further replies.
O

OctavioOlguin

Guest
I just got creative, and tryed to make the following: made a procedure (KeepAlive.p) that posts a heartbeat for that computer (ms widows network) on the appserver. So someone on surveillance can stablish the last time a program of the system reported back. (some "phone home" behavior). on the user program, on some recurrent point, put a RUN func\PutHeartBeat.p ON hServer ASYNCHRONOUS SET handle2this EVENT-PROCEDURE "GotBack" IN THIS-PROCEDURE (thiscomputer, NOW). thinking that if for some reason the appserver is not available, the user on the program, won't stare for 2 minutes waiting his/her computer to respond. then, later there is: PROCEDURE GotBack: DELETE PROCEDURE handle2this. END PROCEDURE. But got error 8982 (Invalid event-procedure context encountered when trying to invoke event procedure ' '. (8982)) when running it... I guess that happened because the procedure KeepAlive.p already was ended. In any case... runned this outside, from the same programa that called keepAlive.p. DEFINE VARIABLE hProc AS HANDLE NO-UNDO. DEFINE VARIABLE iProc AS INTEGER NO-UNDO. DEFINE VARIABLE cEntries AS CHARACTER NO-UNDO. DEFINE VARIABLE cMessage AS CHARACTER NO-UNDO. hProc = SESSION:FIRST-PROCEDURE. cMessage = "This produre: " + THIS-PROCEDURE:FILE-NAME. DO WHILE VALID-HANDLE(hProc): ASSIGN cMessage = cMessage + chr(10) + hProc:INTERNAL-ENTRIES. hProc = hProc:NEXT-SIBLING. END. MESSAGE cMessage VIEW-AS ALERT-BOX. (thanks John Sadd, btw) and it showed that after some testing (in the same session of course) there are several instances of gotback hanging still on memory... wonder if... 1) Is it too crazy, useless, doing this? 2) is this some good approach? What Am I doing wrong? Thanks.!!!

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