John,
Not quite that simple but along those lines. When I need the pessimistic locking strategy (which I find is seldom) I use a semaphore locking technique that never secures a lock on the table actually being edited (except durng the actual writing to disk).
I have a semaphore table in which I store the table's name, the record number, the user ID, and the datetime of the lock. The record in the semaphore table is actually locked as well. When someone tries to start an edit, I search for a record in the semaphore table that matches the table and record. If I find one there I try to lock it (if I can lock it then the other user has left the system so their lock was released) if I can't lock the semaphore record I tell the current user who has the record and when they got it.
Once an edit is finished, I unlock and delete the record in the semaphore table.