[SCJP, SCJD]
The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
Originally posted by S Bala:
When is deadlock possible. In the ULRyBird 1.1.3 assignment, the interface allows modifications to only a single record at any time. So, the client won't be able to make multiple reservations at the same time.
Checked exception received by a thread when another thread interrupts it while it is waiting to acquire a file lock.
Hey guys, I just found the best way to quickly make 1..2..3..4..5..6 new friends !
The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
Always proofread carefully to see if you any words out.
Originally posted by Damian Ryan:
The best way of dealing with deadlocks is to specifically exclude the possibility of their ever arising.
Just a quick note to defend my concept of extending IOException for a DeadLockException. Take a look at java.nio.channels.FileLockInterruptionException which also extends IOException:
quote:
--------------------------------------------------------------------------------
Checked exception received by a thread when another thread interrupts it while it is waiting to acquire a file lock.
--------------------------------------------------------------------------------
My suggestion is in the same spirit.
True deadlock is not IO in so far as it is not something physical on the disk. But do the users care? For them it is just "I asked for something, and you cannot give it to me".
Originally posted by Andrew Monkhouse:
Just a quick note to defend my concept of extending IOException for a DeadLockException. Take a look at java.nio.channels.FileLockInterruptionException which also extends IOException:
Just a quick note to defend my concept of extending IOException for a DeadLockException. Take a look at java.nio.channels.FileLockInterruptionException which also extends IOException:
Regards, Andrew
Max
The professional grade solution here would be to add a data.checkLock method that returns the state of the lock. However, that might be overkill.
Overkill ?! It's a minimum, isn't it ? And even if you do, responsibility is still scattered.
Hey guys, I just found the best way to quickly make 1..2..3..4..5..6 new friends !
PI day is 3.14 (march 14th) and is also einstein's birthday. And this is merely a tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
|