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 SUMIT JAIN <Su...@lntinfotech.com> on 2008/08/20 12:53:07 UTC
OJB Deadlock due to reference descriptor
I am using OJB with java 1.5
I have done the following mapping
<class-descriptor
class="applications.dts.models.testcase.testcasegrid.TestCaseGrid"
table="dts.testcaseactions">
<field-descriptor name="testCaseActionId" column="TestCaseActionID"
primarykey="true" autoincrement="true" access="readonly" />
<field-descriptor name="testCaseId" column="TestCaseID" />
<field-descriptor name="affectedInsert" column="InsertFlag" />
<reference-descriptor
name="actionRef"
class-ref="applications.dts.models.testcase.testcasegrid.testcaseactions.TCAction"
auto-retrieve="true"
auto-update="true"
auto-delete="true" >
<foreignkey field-ref="testCaseActionId"/>
</reference-descriptor>
</class-descriptor>
<class-descriptor
class="applications.dts.models.testcase.testcasegrid.testcaseactions.TCAction"
table="dts.actions">
<field-descriptor name="testCaseActionId" column="TestCaseActionID"
primarykey="true" autoincrement="true" access="readonly" />
<field-descriptor name="testCaseId" column="TestCaseID"
access="readonly"/>
<reference-descriptor
name="testCaseGrid"
class-ref="applications.dts.models.testcase.testcasegrid.TestCaseGrid"
auto-retrieve="true"
auto-update="true"
auto-delete="true" >
<foreignkey field-ref="testCaseActionId"/>
</reference-descriptor>
</class-descriptor>
Logically it should be a deadlock but OJB does not throw any exception and
is working fine.
Can anybody elaborate on this why is it working fine Or is there a mistake
in my mapping?
--
View this message in context: http://www.nabble.com/OJB-Deadlock-due-to-reference-descriptor-tp19067031p19067031.html
Sent from the Apache DB - ObjectRelationalBridge Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org
Re: OJB Deadlock due to reference descriptor
Posted by Ilkka Priha <ip...@norther.org>.
Oops, the tables are not the same, so Roger's reply gives a better answer.
-- Ilkka
Ilkka Priha wrote:
> OJB fully supports mapping of several classes to the same table. In this
> case, you'll read the same data into two data structures being kind of
> "reflections" of each other.
>
> -- Ilkka
>
> SUMIT JAIN wrote:
>> I am using OJB with java 1.5
>> I have done the following mapping
>>
>> <class-descriptor
>> class="applications.dts.models.testcase.testcasegrid.TestCaseGrid"
>> table="dts.testcaseactions">
>> <field-descriptor name="testCaseActionId"
>> column="TestCaseActionID"
>> primarykey="true" autoincrement="true" access="readonly" />
>> <field-descriptor name="testCaseId" column="TestCaseID" />
>> <field-descriptor name="affectedInsert" column="InsertFlag" />
>>
>> <reference-descriptor name="actionRef"
>> class-ref="applications.dts.models.testcase.testcasegrid.testcaseactions.TCAction"
>>
>> auto-retrieve="true"
>> auto-update="true"
>> auto-delete="true" >
>> <foreignkey field-ref="testCaseActionId"/>
>> </reference-descriptor>
>> </class-descriptor>
>>
>> <class-descriptor
>> class="applications.dts.models.testcase.testcasegrid.testcaseactions.TCAction"
>>
>> table="dts.actions">
>> <field-descriptor name="testCaseActionId"
>> column="TestCaseActionID"
>> primarykey="true" autoincrement="true" access="readonly" />
>> <field-descriptor name="testCaseId" column="TestCaseID"
>> access="readonly"/>
>>
>>
>> <reference-descriptor name="testCaseGrid"
>> class-ref="applications.dts.models.testcase.testcasegrid.TestCaseGrid"
>> auto-retrieve="true"
>> auto-update="true"
>> auto-delete="true" >
>> <foreignkey field-ref="testCaseActionId"/>
>> </reference-descriptor>
>> </class-descriptor>
>>
>>
>> Logically it should be a deadlock but OJB does not throw any exception
>> and
>> is working fine.
>> Can anybody elaborate on this why is it working fine Or is there a
>> mistake
>> in my mapping?
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
> .
>
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org
Re: OJB Deadlock due to reference descriptor
Posted by Ilkka Priha <ip...@norther.org>.
OJB fully supports mapping of several classes to the same table. In this
case, you'll read the same data into two data structures being kind of
"reflections" of each other.
-- Ilkka
SUMIT JAIN wrote:
> I am using OJB with java 1.5
>
> I have done the following mapping
>
> <class-descriptor
> class="applications.dts.models.testcase.testcasegrid.TestCaseGrid"
> table="dts.testcaseactions">
> <field-descriptor name="testCaseActionId" column="TestCaseActionID"
> primarykey="true" autoincrement="true" access="readonly" />
> <field-descriptor name="testCaseId" column="TestCaseID" />
> <field-descriptor name="affectedInsert" column="InsertFlag" />
>
> <reference-descriptor
> name="actionRef"
>
> class-ref="applications.dts.models.testcase.testcasegrid.testcaseactions.TCAction"
> auto-retrieve="true"
> auto-update="true"
> auto-delete="true" >
> <foreignkey field-ref="testCaseActionId"/>
> </reference-descriptor>
> </class-descriptor>
>
> <class-descriptor
> class="applications.dts.models.testcase.testcasegrid.testcaseactions.TCAction"
> table="dts.actions">
> <field-descriptor name="testCaseActionId" column="TestCaseActionID"
> primarykey="true" autoincrement="true" access="readonly" />
> <field-descriptor name="testCaseId" column="TestCaseID"
> access="readonly"/>
>
>
> <reference-descriptor
> name="testCaseGrid"
> class-ref="applications.dts.models.testcase.testcasegrid.TestCaseGrid"
> auto-retrieve="true"
> auto-update="true"
> auto-delete="true" >
> <foreignkey field-ref="testCaseActionId"/>
> </reference-descriptor>
>
> </class-descriptor>
>
>
> Logically it should be a deadlock but OJB does not throw any exception and
> is working fine.
> Can anybody elaborate on this why is it working fine Or is there a mistake
> in my mapping?
>
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org
RE: OJB Deadlock due to reference descriptor
Posted by "Janssen, Roger" <ro...@ibanx.nl>.
Hi,
OJB detects circular references and stops traversing if it detects an
object already instantiated, it uses a cache for that.
Roger Janssen
iBanx
-----Original Message-----
From: SUMIT JAIN [mailto:Sumit.Jain@lntinfotech.com]
Sent: Wednesday, August 20, 2008 12:53 PM
To: ojb-user@db.apache.org
Subject: OJB Deadlock due to reference descriptor
I am using OJB with java 1.5
I have done the following mapping
<class-descriptor
class="applications.dts.models.testcase.testcasegrid.TestCaseGrid"
table="dts.testcaseactions">
<field-descriptor name="testCaseActionId"
column="TestCaseActionID"
primarykey="true" autoincrement="true" access="readonly" />
<field-descriptor name="testCaseId" column="TestCaseID" />
<field-descriptor name="affectedInsert" column="InsertFlag" />
<reference-descriptor
name="actionRef"
class-ref="applications.dts.models.testcase.testcasegrid.testcaseactions
.TCAction"
auto-retrieve="true"
auto-update="true"
auto-delete="true" >
<foreignkey field-ref="testCaseActionId"/>
</reference-descriptor>
</class-descriptor>
<class-descriptor
class="applications.dts.models.testcase.testcasegrid.testcaseactions.TCA
ction"
table="dts.actions">
<field-descriptor name="testCaseActionId"
column="TestCaseActionID"
primarykey="true" autoincrement="true" access="readonly" />
<field-descriptor name="testCaseId" column="TestCaseID"
access="readonly"/>
<reference-descriptor
name="testCaseGrid"
class-ref="applications.dts.models.testcase.testcasegrid.TestCaseGrid"
auto-retrieve="true"
auto-update="true"
auto-delete="true" >
<foreignkey field-ref="testCaseActionId"/>
</reference-descriptor>
</class-descriptor>
Logically it should be a deadlock but OJB does not throw any exception
and is working fine.
Can anybody elaborate on this why is it working fine Or is there a
mistake in my mapping?
--
View this message in context:
http://www.nabble.com/OJB-Deadlock-due-to-reference-descriptor-tp1906703
1p19067031.html
Sent from the Apache DB - ObjectRelationalBridge Users mailing list
archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org
*************************************************************************
The information contained in this communication is confidential and is
intended solely for the use of the individual or entity to whom it is
addressed.You should not copy, disclose or distribute this communication
without the authority of iBanx bv. iBanx bv is neither liable for the
proper and complete transmission of the information has been maintained
nor that the communication is free of viruses, interceptions or
interference.
If you are not the intended recipient of this communication please return
the communication to the sender and delete and destroy all copies.
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org