Forums Register Login

timeout for client

+Pie Number of slices to send: Send
Hi All,
I am trying to implement the time out functionality for the locked records by a particular Client. Now I have gone throw the msgs posted on this list and what I have understand from here is to have a static synchronized map and store the recNo and the time at which the record was locked.
Now my question is here how is the timeout checked, have you guys/gals used a Timer to check the map after every min or so. I am a little confused here about the timeout. Do we even need to provide this functionality if not why every one is using a hashtable and not a vector for locking.
thanks
Aslam
+Pie Number of slices to send: Send
Rather than a fixed timeout period, I implemented a trap that frees locks when a given connection ends. If you used RMI, take a look at the "Unreferenced" interface that RMI supports. If you have a connection object that relates directly to a client connection, then you can free locks whenever the unreferenced() method gets called on your object...
and POOF! You're gone! But look, this tiny ad is still here:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 471 times.
Similar Threads
Passed with 95%
3rd level of locking
uestion about General locking mechanism
Locking strategy URLyBird 1.1.1 with ReentrantLock
Data Locking with a DB File.
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 10:15:46.