You could have a phantom utility launched by cron that steps through the lock 
table, attempts to acquire a lock on the each locked item, and loops while 
keeping track of elapsed time.  If the lock is released within the time limit, 
exit and do nothing.  If the time is exceeded, send something to the user's 
/dev/tty device prior to exiting (could be a message, or you could just repeat 
the terminal bell 5000 times to get their attention without scrolling the 
display up).  There is some shell scripting involved in isolating the user's 
tty and sending output to it, but it's not too complex.  This is similar to how 
we handle users that are holding up phantom processes that can't speak for 
themselves.  You'd need to have a number of these processes spawning 
simultaneously to cover all the locks, though.  In our application, the phantom 
that's being held up writes out a record indicating who the culprit is, so we 
only need a single instance of the monitoring script running.  That's probably 
a cleaner way to handle the situation, but it would involve rewriting your 
application to include locked clauses.


-----Original Message-----
[] On Behalf Of Don Robinson
Sent: Tuesday, March 27, 2012 6:27 AM
To: U2 listserver
Subject: [U2] Detecting idle time in INPUT statement.

Hello all,
We are running Universe 10.1 on AIX with about 500 users. We have a problem 
with users opening up a record which puts a lock on it and just letting it sit 
at the INPUT statement for a long time.
Most of the locking within the application does not use the LOCKED clause so 
when a second person needs the locked record, their session waits.
What is the best way to detect the user hasn't typed anything for a period of 
time, say 2 minutes? This needs to be simple as we have no desire to rewrite 
the application!
IIRC, some other MV systems have a timeout on the INPUT but I can't find 
anything about this in the UV manual.

Don Robinson
U2-Users mailing list
U2-Users mailing list

Reply via email to