Rainer Klute wrote:
this is good news! However, I need something working the next days that supports circularreferences and lets modifications of persistent objects to be ignored if these objects are
not locked in a ODMG transaction.
"something working the next days", puh!
This is exactly what we want for 1.1. We have to introduce a real two-level cache.
On first level we temporary buffer objects to resolve circular references, on second level we cache copies of objects without their references. This is nothing to make work in a few days ;-)
In CVS you can find a ObjectCache (alpha-)implementation by Oliver Matz called TwoLevelCache which try to bypass current cache problems (but cause new problems).
Do you have an idea to do this right? Presently I am thinking about copying a whole graphof persistent objects to an equivalent graph of non-persistent ones. The latter I can modify
at will without consequences to the database or to the cache. However, if I decide to persist
them I have a) to delete the object tree from the DB (and from the cache) and b) make my
non-persistent tree persistent. This is one big hack with all sorts of pitfalls and I'd
like to know if there's a better approach.
hmm, you can use non-distributed ObjectCache implementation, e.g. ObjectCachePerBrokerImpl. This supports circular references and avoid concurrent object modification by other threads/broker instances.
But you will loose all cached objects when broker was closed/rolled back.
Nevertheless, if you have a fast DB and a fast network between OJB and DB this should be ok.
Or before start to modify make a deep copy of the object (e.g. introduce a CopyFactory or something similar), then lock the copy and start to modify.
regards, Armin
Best regard Rainer Klute
Rainer Klute IT-Consulting GmbH Dipl.-Inform. Rainer Klute E-Mail: [EMAIL PROTECTED] K�rner Grund 24 Telefon: +49 172 2324824 D-44143 Dortmund Telefax: +49 231 5349423
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
