Hi Guys,
I am trying to figure out how i can use the Unreferenced interface to release a lock a client has if the client should crash unexpectedly.
I have implemented the locking in a seperate Lock managaer class and the locking is implemented on the server side in a
pattern similar to lock(recno)-> dooperation(recno)->unlock(). Although the chance of the lock remaining even if the client crashes is small it still is possible.
Now i have decided to implement the Unreferenced interface on the Remote server object- each client will have its own unique instance of the remote object (this is how we identify the client that owns the lock).
Now the method unreferenced() will be called by the server on each client stub which is stale or which may have crashed however i would like to implement in here some logic which would release the client lock from a hashtable which stores the client which holds the lock on a record should the client crash.
However i am not sure how i can do this? how can i uniquely identify the client to allow me to release its lock from the hashtable inside the unreferenced() method.
Perhaps others have used this interface in a different way to achieve the same objective here...
I have read a number of other posts on this issue and there is no definitive answer on the issue.
Any help would be appreciated
david