Hello Ren�:
Thank you for responses. I tried both test as you indicated.
Disabling unlock method I opened two clients. I mean two GUI. I processed for flight booking. Following was the result. By the way, after I clicked button on second GUI. GUI changed into gray color and lost tables, buttons and lables. But good news you know what! I saw "Waiting to be locked Record #: 20" message on DOS window.
Delaying Process I wrote following code at the begining of unlock method.
I am glad to let you know that I see "Waiting to be locked Record #: 7" message. But it is my surprise that why I did not see "I am delaying process for TEN seconds" message which is at the begining of unlock method. This time I opened five GUI (clients) and wanted to test. I tried to change same record. I think I should have seen four message "Waiting to be locked Record #", right!
Why I had only 3. I do not know.
I am using RMI. There is no gurantee that each client get separate
thread. Does this small test show there will not be any deadlock? How can I be sure that there will not be any problem in lock and unlock method? I mean, will they run smoothly without any glitch? Is there any other way to be sure?
Your views in this regards highly appriciated. Thanks -Bal