SCJP 6
SCJP 6
It's not synchronized, also reason to synchronize method, that if someone add record with match criteria while we looping...but I think it's over complicated, as we haven't create operation in business logic?
Cheers, Roberto Perillo
SCJP, SCWCD, SCJD, SCBCD
Pedro Kowalski wrote:To be prepared for such situations, an atomic findAndRead() method should be introduced to the DB interface. At this moment, I justified that in my opinion it's behind the scope of the assignment to cope with it :-)
Roel De Nijs wrote:I added such method to my own interface (extending the required-to-implement one).
Cheers, Roberto Perillo
SCJP, SCWCD, SCJD, SCBCD
SCJP 6
SCJP 6
SCJP 6
Roel De Nijs wrote:
Pedro Kowalski wrote:To be prepared for such situations, an atomic findAndRead() method should be introduced to the DB interface. At this moment, I justified that in my opinion it's behind the scope of the assignment to cope with it :-)
I added such method to my own interface (extending the required-to-implement one).
SCJP (1.4 | 5.0), OCJP (6.0), OCMJD
Consider Paul's rocket mass heater. |