Hi all
I plan to use unreferenced interface to solve the hanging lock problem (a client hold a lock but for some reason, it can't communicate with RMI server, and this produces a hanging lock other client can't get that lock again).
But after I dig the RMI, I find it is problematic. Say there are two clients, Client A and Client B all communicate with one remote object (The number of reference to the remote object is 2), and Client A holds lock X, then something miserable happens, Client A can't communicate with RMI server, cause Client A can't send back the lease after a while DGC notice the problem and the reference to the remote object is reduced to 1, after that Client B want to hold lock X but it can't cause no one unlock the lock X, the reference to the remote object is never become 0 so the unreferenced interface is useless.
Any suggestions or comments are welcome. And thank you for your advice.
[ October 09, 2002: Message edited by: Hai Wei ]
I plan to use unreferenced interface to solve the hanging lock problem (a client hold a lock but for some reason, it can't communicate with RMI server, and this produces a hanging lock other client can't get that lock again).
But after I dig the RMI, I find it is problematic. Say there are two clients, Client A and Client B all communicate with one remote object (The number of reference to the remote object is 2), and Client A holds lock X, then something miserable happens, Client A can't communicate with RMI server, cause Client A can't send back the lease after a while DGC notice the problem and the reference to the remote object is reduced to 1, after that Client B want to hold lock X but it can't cause no one unlock the lock X, the reference to the remote object is never become 0 so the unreferenced interface is useless.
Any suggestions or comments are welcome. And thank you for your advice.
[ October 09, 2002: Message edited by: Hai Wei ]