Dear fellows I tried to test the deadlock situation. I did domething like: if(lock) wait() not thread.sleep(timeout) I testeing in the same machine with VAJ 4.0, with one server and two instance of the clients all executed from VAJ environment. But looks like both clients waits for the timeout, the second one never go to wait() method. I also implemented a Timer for the deadlock and I really don�t now how to test in the same machine. Some advice ? Thanks in advance
I used the command-line debugger (jdb) to test my locking scheme. I ran two or three instances of the client app without the GUI -- as essentially my own test-harness. I ran each in the debugger. I set a breakpoint right after the lock()-call in each one. That showed that when a given record was locked (by whichever client I'd started first), other clients indeed had to wait until I entered "continue" in the debugger in which the other one(s) was(were) running. That allowed the one(s) with the lock to release it, thereby giving the other(s) a chance to proceed -- realizing that there is contention sometimes (when more than one is waiting for the lock on a given record).
Hello: One of the Rancher suggested me to disable the unlock method, recompile and run it. I saw blocked message, but it froze my screen. Another suggestion was quite good. Implement a delay Thread.sleep(...) at the begining of your unlock method. Happy testing. -Bal
Quick! Before anybody notices! Cover it up with this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!