Hello,
Thanks Gurpreet and Micheal for the reply...that was fast.
ok the timeout issue is resolved now... as for the db lock
Micheal worte as such:
If you wait for the pool to empty, you may never acquire a dblock.
Actually what I had thot of is(but yet to implement), first have a waiting queue in lock mgr so before the wait() method is called I add the client to the waiting queue which is later removed upon acquiring the lock.
Later, if a request for db lock is received, I set the flag for dbLock to true [this flag will fail further requests to acquireLock ie. lock(recNum) will throw an IOException] and wait until the waiting queue is empty. My idea of db maintenance is that it's temporary of course, but can take quite a while to complete. I would rather inform clients to try again later then to keep them waiting... Feel free to correct if am wrong or if it's a bad idea altogether.
Frankly speaking, I am really confused as to how much we should consider for this assignment... certified scjds out there probably u'd like to share ur views on ... "how much is too much and how much is just enuf".
Sarita