How was it in Italy ?
But as Max criticized my solution (forcing the locking server-side by design seemed to be too much restrictive as far as I understood our very short discussion about it)
Originally posted by Vlad Rabkin:
Hi Phil,
Uppss... What do you mean? I thought that he critized using Thread.currentThread() reference, because it will not work with RMI. Now it seems that I understood it not correctly.
Vlad
Using Thread.currentThread() as the lock owner worked well with RMI ...
So I interpreted max's critique as that, by design, my LockManager class didn't support client-side locking
I noticed that he is far less talkative with me than he can be with you
Originally posted by Philippe Maquet:
Hi Vlad,
Uppss... What do you mean? I thought that he critized using Thread.currentThread() reference, because it will not work with RMI. Now it seems that I understood it not correctly.
Using Thread.currentThread() as the lock owner worked well with RMI (as well with my sockets implementation), as far as you handle locks/unlocks within a given method server-side, like this :
Even in RMI (RMI is not magic ), such a piece of code will still be executed by only one given thread. In case the client crashes, the finally blocks takes care of unlocking (OK), while in the middle, Thread.currentThread() is well a valid lock owner.
So I interpreted max's critique as that, by design, my LockManager class didn't support client-side locking. BTW I don't need it, but as I know that at least one (old ?) assignment forced you to implement the whole Data access client-side, I was afraid of my design restriction. Unfortunately, all of that are just guesses of my own, because Max stopped the discussion (I noticed that he is far less talkative with me than he can be with you - don't be jealous, Phil it's bad ! )
Regards,
Phil.
Let me see if I have this straight. Client C1->DataAdapter.book()? Is that correct?
And is there one Data per client?
If so, then DataAdapter is a remote object?
I have a few testing suggestions for you, if you're interested.
sure you've tested with multiple clients. However, have you tested with clients who release their connection? That is, where your client count goes to, say, 12, then,6, then 10? Also, have you created artificially long delays between the various steps of your book method?
Don't get me started about those stupid light bulbs. |