There's that. Depending on how you implement criteriaFind, there are concurrency issues with add() and write() as well. The simplest and most sane approach is to take your cue from the find() method which does, after all, exactly the same job that criteriaFind() does if in a more limited way.Originally posted by Arjan Broer:
While reading all the records an other thread could delete a record. [...]
Peter den Haan | peterdenhaan.com | quantum computing specialist, Objectivity Ltd
-Matt<br /> SCJP2<br /> SCJD
Actually I'm not suggesting you do; just that you draw your inspiration from it. They're quite similar.Originally posted by Arjan Broer:
I don't see how i could use the find methode sinds i don't have the value for the key field.
Peter den Haan | peterdenhaan.com | quantum computing specialist, Objectivity Ltd
That it's very tempting, as it improves the level of concurrency supported by the Data class. It is a questionable approach though, for the following reasons.Originally posted by Bernhard Woditschka:
I parse the criteria, then loop trough all record ids (1 to max) get the record through the synchronized getRecord(idx) do my criteria thing and add it to the reponse (if not excluded) [...] What do you think ?
Peter den Haan | peterdenhaan.com | quantum computing specialist, Objectivity Ltd
-Matt<br /> SCJP2<br /> SCJD
Idealy, you should lock all the records while doing serach, but I didn't do it. And I passed anyway
While Oracle does have all those locks, it does not normally lock records for a plain run of the mill read! The Oracle Concepts document from the Oracle 8i documentation talks a bit about read consistency:Originally posted by Arjan Broer:
Oracle does lock the records on a read. But Oracle has Share lock, write locks, exclusive share locks, exclusive write locks and a hole bunch of intended locks.
Why do you say that only now! I've just gotten locks to work on my FBN relational database with the clustering feature and was about to upload the two DVDs with my assignment to SunThough i do agree with you when you say this could be sligthly out of scope for this assignment.
Peter den Haan | peterdenhaan.com | quantum computing specialist, Objectivity Ltd
Don't get me started about those stupid light bulbs. |