File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Developer Certification (SCJD/OCMJD)
a record has been deleted,then unlock throws exception ..trouble!!!
Strong Z.Q. Jiang
Joined: Dec 25, 2005
Jan 26, 2006 07:48:00
if a client wants to delete a record,it maybe call such methods in following order:
long cookie = lock(recNo);
the trouble is:
if the record was deleted successfully then the unlock methods must throws RecordNotFoundException,I think it is unreasonable,how do you think?
Joined: Dec 27, 2005
Jan 26, 2006 21:08:00
Does the throws specification in your unlock() method allow for RecordNotFound to be thrown? If not, then the only thing you can do is nothing.
SCJD<br />SCJP 1.4
I agree. Here's the link:
subject: a record has been deleted,then unlock throws exception ..trouble!!!
RecordNotFoundException and unlock
IOException in db find method
unlock with delete
Trouble understanding the Data.java logic
B&S What to do with delete
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015