Hi Armin, 

Loop occurs on lookup. Yes we do override the equals methods. Is this
significant?

We use the empty object cache implementation...
ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCacheEmptyImpl

My comments regarding the effect of auto-retrieve="false" were not correct.
When I isolated our problem classes I eventually found the cyclic reference
(there are a number of nested collections and reference descriptors
involved). Setting auto-retrieve to false on the problem reference
descriptor did fix the problem. However this is still different behaviour
between rc4 and rc5. 

Thanks
Stuart

-----Original Message-----
From: Armin Waibel [mailto:[EMAIL PROTECTED]
Sent: Friday, 13 February 2004 8:12 PM
To: OJB Users List
Subject: Re: RC5 and cyclic references PROBLEM


Hi Stuart,

Stuart Heriot wrote:
> G'day, 
> 
> I've been testing rc5 and am seeing some unexpected behaviour with regard
> cyclic references (eg. ClassA contains a collection of ClassB ojbects.
> ClassB contains a reference to a ClassA object. 
> 
> We have been running with rc4 ok but when we run with rc5, same code same
> repository, it does not resolve the cyclic reference and gets caught in a
> loop when you retrieve ClassA, which retrieves collection of ClassB each
of
> which retrieve an instance of ClassA which then retrieves collection of
> ClassB each of which.... and on it goes!
> 
> This occurs even when we set auto-retrieve="false" on all collection and
> reference descriptors.

hmm, sounds strange.
When does the infinite loop occur - lookup, store delete?
Do you override equals method in your persistance capable objects?

> 
> Has something been broken in rc5 or is there some change required to the
> repository file for this to work correctly?

Which ObjectCache implementation do you use? In ObjectCacheDefaultImpl 
was a bug in handling cached objects (use of SoftReferences), so under 
heavy load current cached objects may gc.

Try latest from CVS HEAD and see what's going on.

regards,
Armin

> 
> Thanks in advance
> Stuart Heriot
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to