>Hi Marc, Long time no see :-)
Yes, you know. Changing jobs and all that. Kind of keeps you busy.
>
>We needed to know who was using a particular record (or in some cases a subset of records), so we designed a semaphore table.
Right! Semaphore table. Do I like the sound of that :). But it's too late, I called it Locks already.
We call a 'GetSemaphore()' function to see if someone is using that record, and a 'PutSemaphore()' which stores the machine name, the user name (from our oUser object) and the record (or area) being 'locked'. We clear all semaphores when a user/machine combo logs on (in case their last exit was abnormal) and when they log off.
It's interesting that you do not use the native rlock()/unlock at all then? Is there a particular reason for that, apart from going C/S, but then you would rely on DBMS's native "semaphore" management no?
It's been working fine for 3 months now, and users are really pleased to know that "Diane on Shipping 1" has locked something - they know who AND what computer to check.
Come to think of it, it is must in any Data intensive environment where you cannot rely on optimistic locking schemes. And I do not like the timeout scheme either because in busy environments, sometimes the offender _needs_ the information locked, and in other instances, the person who accesses a locked record needs it urgently.
In our next version we (and I mean you and me) will be implementing the automatic sending of a polite message to the locking station I guess. The things we do to keep the customer satisfied...
>
>Of course, we DO have a problem - one of the worst offenders about leaving their system running is Customer Service - and they run over PCAnywhere on a computer in the locked server room. When THEY are the culprits, everyone runs around searching for a supervisor with the key :-)
>
Wait a minute, you do rlock() the records then. Because if you don't why not tamper with the Semaphore table?
Probably missing something here. One gets used to the feeling with age. :)
Thank you for caring and kind regards.
Marc
If things have the tendency to go your way, do not worry. It won't last. Jules Renard.