Lock Wait Timeout

Subhransu

Member
Hi All,
I need to capture all the lockwait timeouts in the application (both foreground and background). How would I do that?


Thanks.
Subhransu
 

TomBascom

Curmudgeon
The STOP condition is raised in the session so you could trap that (the FIND below could be RUN and a variation of this procedure could be a generic wrapper):

Code:
define variable i as integer no-undo.

outer: do:

  stop_block: do on stop undo, retry:

    if retry then
      do:
        message "Retry - STOP!".
        pause.
        if error-status:num-messages > 0 then
        do i = 1 to error-status:num-messages:
          message i error-status:get-number( i ) error-status:get-message( i ).
        end.
        leave outer.
      end.

    find first customer exclusive-lock.

  end.

end.

return.

But, as the sample above shows, no error status is indicated and there is no way to tell that the STOP is a result of lkwtmo.

Nothing is written to the .lg file.
 
Top