A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
EJB 3 in Action
this week in the
EJB and other Java EE Technologies
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!!!
unlock with delete
RecordNotFoundException and unlock
B&S What to do with delete
Trouble understanding the Data.java logic
IOException in db find method
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014