You are have two different instances of Data, one for local, and one for remote, not?
code:
dataAdaptater = ClientConnector.getLocal("./");
recordNumber =13; new LockTest(dataAdaptater , recordNumber);
dataClient = ClientConnector.getRemote("localhost", 1099);
[\QOTE]
Note that dataAdaptater implements DataClient, so it is OK.
In fact I redid the test with :
and I get the same result : the two instances get the lock , which does not happen with multiple remote instances!. In fact with some debugging in the server side, I saw that the lockedRecord hashmap (althought static) is nott the same server/local....the record does not appera to be locked and each instance locks it.
Why is that ? It is static and should be shared by all the instances I create wether they are from a static or remote connection they are DataClient instances and should share lockedRecord!!!
It is sahred by multiples remote instances, I checked, so why is it that way with one remote and on local???
There is something I don't get....
One solution to that will be do the test at the server main thread, remote clients get your DataClient instance through the registry, and local use that DataClient instance you bind ...
I am not sur I undersatnd what you mean here....
It is my turn to grab a - stong - coffee now...
Thanks again
- Lydie