Martin Taal wrote:
Hi Armin,
Yes I just tested it with the 1.0.3 cvs branch and it is reproducable.

Strewth!

Do you want me to enter an issue in jira with an attached example (maybe my setup is wrong?)?


yes please. I will try to setup an test case for this issue.

Regards,
Armin



gr. Martin

Armin Waibel wrote:

Hi Martin,

I assume it's a 1.x specific issue. I didn't do the backport of 1.0.x branch to 1.x yet (it's really much work and I didn't find the time to do it). Is it reproduceable with the 1.0.x branch or 1.0.3?

regards,
Armin

Martin Taal wrote:

Hi,
I noticed that ojb gets into an infinite loop when there are circular dependencies between objects and refresh(=true) is specified on the reference descriptors.


My testcase has a class A which points to B and vice versa and there is an instance of A (A1) which points to an instance of B (B1) and B1 points back to A1.

When A1 is read and a getB is done the system gets in an infinite loop.

Looking at the stacktrace I see that the following is happening:
When A1 reads B1 then the relations of B1 are refreshed which again gets A1 from the cache which reads B1 and B1 refreshes its references which gets A1 from the cache which again refreshes it references etc.


See also the repository.xml below.
Is this really an issue or is my setup wrong?

I am looking at the latest 1.1 cvs version and using the PB api.

Here is my repository.xml:

<!-- class: org.elver.store.test.testcasesimple.B in table: B -->
<class-descriptor class="org.elver.store.test.testcasesimple.B" table="B">


<field-descriptor name="name" column="name" jdbc-type="VARCHAR" nullable="true"/>

<field-descriptor name="A_ID" column="A_ID" jdbc-type="INTEGER" nullable="true" access="anonymous"/>

<reference-descriptor name="myA" class-ref="org.elver.store.test.testcasesimple.A" refresh="true" auto-update="object" auto-retrieve="true">
<foreignkey field-ref="A_ID" />
</reference-descriptor>
<field-descriptor name="ID" column="ID" jdbc-type="INTEGER" primarykey="true" autoincrement="true" access="anonymous"/>


</class-descriptor>

<!-- class: org.elver.store.test.testcasesimple.A in table: A -->
<class-descriptor class="org.elver.store.test.testcasesimple.A" table="A">


<field-descriptor name="name" column="name" jdbc-type="VARCHAR" nullable="true"/>

<field-descriptor name="B_ID" column="B_ID" jdbc-type="INTEGER" nullable="true" access="anonymous"/>

<reference-descriptor name="myB" class-ref="org.elver.store.test.testcasesimple.B" refresh="true" auto-update="object" auto-retrieve="true">
<foreignkey field-ref="B_ID" />
</reference-descriptor>
<field-descriptor name="ID" column="ID" jdbc-type="INTEGER" primarykey="true" autoincrement="true" access="anonymous"/>


</class-descriptor>



--------------------------------------------------------------------- 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]



Reply via email to