You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Stuart Heriot <sh...@infocomp.com> on 2004/02/13 02:57:01 UTC

RC5 and cyclic references PROBLEM

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. 

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

Thanks in advance
Stuart Heriot

Re: RC5 and cyclic references PROBLEM

Posted by Armin Waibel <ar...@apache.org>.
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: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org