Hi, Find() in the DBMain interface returns int... as users we are interested in the actual records not the record numbers of course... so the algorethim would be something like this: 1. in the business layer the user invokes search() 2. search() invokes find() and get int 3. search() starts reterieving recrods returned from find()
here is the problem: WHAT IF the CPU decides that another threadshould run after step 2, and that thread is changing one of the records (for example changing the name of the contractor) that happen to be returned by find(). the user issued the search might end up with record(s) that don't match his/her criteria.
SCBCD - SCWCD - SCJD - SCJP - OCA
posted 9 years ago
The same problem was discussed at this post, give it a look.
To resume, the idea is to re-validate each record when you retrieve it after the find() method.