Salesforce

Trap AppServer lock wait time out with ON STOP Phrases

« Go Back

Information

 
TitleTrap AppServer lock wait time out with ON STOP Phrases
URL NameP28872
Article Number000150199
EnvironmentProduct: Progress
Version: 9.x
Product: OpenEdge
Version: All Supported Versions
OS: All Supported Platforms
Question/Problem Description
How to trap a remote AppServer lock wait time out on the client side?
How to handle Lock wait timeout of seconds expired (8812)
Steps to Reproduce
Clarifying Information
Error Message
Defect Number
Enhancement Number
Cause
Resolution
When a lock wait timeout occurs on the AppServer, due to a lock conflict that lasted too long (see -lkwtmo startup parameter to change default of 30 minutes), a STOP condition is raised on the client side.

We cannot trap this stop condition by checking ERROR-STATUS:ERROR next to a RUN MyProc ON SERVER NO-ERROR. The only way to handle this situation is to use the ON STOP phrase, as illustrated below:

RUN testlkwtmo.

MESSAGE RETURN-VALUE
    VIEW-AS ALERT-BOX INFO BUTTONS OK.

PROCEDURE testlkwtmo:

  DEFINE VARIABLE flag AS LOGICAL NO-UNDO.

  DEFINE VAR sh AS WIDGET-HANDLE. /* Server handle */

  DO ON STOP UNDO, RETURN "STOP occurred":

    CREATE SERVER sh.
    sh:CONNECT("-AppService lto -H localhost").
    RUN AS.p ON SERVER sh (OUTPUT flag) NO-ERROR.

    MESSAGE "flag :" flag SKIP
            "ERROR-STATUS:ERROR :" ERROR-STATUS:ERROR
        VIEW-AS ALERT-BOX INFO BUTTONS OK.
  END.
END PROCEDURE.

 
If as.p is terminated on the AppServer because of a lock wait time out, a STOP condition proliferated to the client. The flow of the program never reaches the message after the RUN statement, however the calling program will catch the STOP condition handle the RETURN-VALUE.

Workaround
Notes
Keyword Phrase
Last Modified Date9/13/2015 4:48 AM

Powered by