yes persistence broker wich fetch folder is different from that one wich materialize children.
So to prevent this I need touch all objects in single persistence broker (long-lived caches dont feet me because I'm using web application with many clients).
But I think its not good to iterate over the whole folder tree and touch every object because every touch is call to database.
If I cauld say OJB prefetch "parent" and "children" reference in all folders wich I materizalize by this call it would be more productive
Clute, Andrew wrote:
What version of OJB are you using (1.0, 1.0.2?), and which type of cache are you using? (ObjectCacheTwoLevel, ObjectCacheDefaultImpl)?
The issue stems from the fact that your proxy collection is being materialized with 1) a different PersistneceBroker instance then the parent object, and 2) You are using a cache implementation that either creates copies (ObjectCacheTwoLevel) or is short-lived (ObjectCachePerBroker).
This is a known issue, especially with all the cache implementations other than ObjectCacheDefault.
For instance, if you are using ObjectCacheTwoLevel, it guarantees detached objects from the application cache, while guaranteeing the same reference for logically identical objects, but only for the life of the PersistenceBroker. So, if the parent object is created in one PB instance, and the collection proxy is materialized in another PB instance, you will get different references for your 'folder' object.
Can you tell me a little bit more about your application: Is this a web app? What is the lifecycle for your PersistenceBrokers (do you use one for each action? Keep one open for the entire request?). Does the materlization of our parent 'folder' object happen in the same request as when the collection proxy is 'touched' and forced to be materialized?
-Andrew
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]