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 Sami Altundağ <sa...@genelsigorta.com> on 2004/03/26 19:08:30 UTC

Help--> circular reference stucks even when cache is used.

 
I am using rc5. Following configuration stucks on some records.
 
 
I used
ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCachePerBrokerImpl as
the object cache but it didnt solve the problem. 
 
 
Any help is welcome.
 
 
Sami Altundag
 
 
 
<class-descriptor class="com.musteri.pos.KartoteksImpl"
table="KARTOTEKS" schema="KARTOTEKS" >
            <field-descriptor name="KartoteksId" primarykey="true"
column="KARTOTEKSID" jdbc-type="BIGINT"  autoincrement="true"/>
        
 
            <collection-descriptor name="ChildIliskis"
element-class-ref="com.musteri.pos.IliskiImpl" auto-update="true"
auto-delete="true" auto-retrieve="false">
                        <inverse-foreignkey field-ref="ParentKId"/>
            </collection-descriptor>
            <collection-descriptor name="ParentIliskis"
element-class-ref="com.musteri.pos.IliskiImpl" auto-update="true"
auto-delete="true" auto-retrieve="false">
                <inverse-foreignkey field-ref="ChildKId"/>
            </collection-descriptor>
        
</class-descriptor>
 
 
<class-descriptor class="com.musteri.pos.IliskiImpl" table="ILISKI"
schema="KARTOTEKS"  >
            <field-descriptor name="IliskiID" primarykey="true"
column="ILISKIID" jdbc-type="BIGINT" autoincrement="true"/>
            <field-descriptor name="ParentKId" column="PARENTKID"
jdbc-type="BIGINT"/>
            <field-descriptor name="ChildKId" column="CHILDKID"
jdbc-type="BIGINT"/>
 
        <!--
 
            This part is in quota and doesnt affect the problem.
 
        
            <reference-descriptor name="ParentKartoteks" proxy="true"
class-ref="com.musteri.pos.KartoteksImpl" auto-update="false"
auto-delete="false"  auto-retrieve="true">
                        <foreignkey field-ref="ParentKId"/>
            </reference-descriptor>
        
            <reference-descriptor name="ChildKartoteks" proxy="true"
class-ref="com.musteri.pos.KartoteksImpl" auto-update="false"
auto-delete="false"  auto-retrieve="true">
                        <foreignkey field-ref="ChildKId"/>
            </reference-descriptor>
             -->
                
</class-descriptor>

RE: Help--> circular reference stucks even when cache is used.

Posted by Sami Altundağ <sa...@genelsigorta.com>.
Hi, 

I found out that an ojb query in afterLookup is the cause of the
problem. The problem solved when I removed the query.=20


In summary, There is a 1-N relation. The query is in on the many side of
the relation returning result from the one side.

Isn't that a bug?


Sami Altundag


-----Original Message-----
From: Sami Altundağ [mailto:saltundag@genelsigorta.com] 
Sent: Friday, March 26, 2004 8:09 PM
To: ojb-user@db.apache.org
Subject: Help--> circular reference stucks even when cache is used.

 
I am using rc5. Following configuration stucks on some records.
 
 
I used
ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCachePerBrokerImpl as
the object cache but it didnt solve the problem. 
 
 
Any help is welcome.
 
 
Sami Altundag
 
 
 
<class-descriptor class="com.musteri.pos.KartoteksImpl"
table="KARTOTEKS" schema="KARTOTEKS" >
            <field-descriptor name="KartoteksId" primarykey="true"
column="KARTOTEKSID" jdbc-type="BIGINT"  autoincrement="true"/>
        
 
            <collection-descriptor name="ChildIliskis"
element-class-ref="com.musteri.pos.IliskiImpl" auto-update="true"
auto-delete="true" auto-retrieve="false">
                        <inverse-foreignkey field-ref="ParentKId"/>
            </collection-descriptor>
            <collection-descriptor name="ParentIliskis"
element-class-ref="com.musteri.pos.IliskiImpl" auto-update="true"
auto-delete="true" auto-retrieve="false">
                <inverse-foreignkey field-ref="ChildKId"/>
            </collection-descriptor>
        
</class-descriptor>
 
 
<class-descriptor class="com.musteri.pos.IliskiImpl" table="ILISKI"
schema="KARTOTEKS"  >
            <field-descriptor name="IliskiID" primarykey="true"
column="ILISKIID" jdbc-type="BIGINT" autoincrement="true"/>
            <field-descriptor name="ParentKId" column="PARENTKID"
jdbc-type="BIGINT"/>
            <field-descriptor name="ChildKId" column="CHILDKID"
jdbc-type="BIGINT"/>
 
        <!--
 
            This part is in quota and doesnt affect the problem.
 
        
            <reference-descriptor name="ParentKartoteks" proxy="true"
class-ref="com.musteri.pos.KartoteksImpl" auto-update="false"
auto-delete="false"  auto-retrieve="true">
                        <foreignkey field-ref="ParentKId"/>
            </reference-descriptor>
        
            <reference-descriptor name="ChildKartoteks" proxy="true"
class-ref="com.musteri.pos.KartoteksImpl" auto-update="false"
auto-delete="false"  auto-retrieve="true">
                        <foreignkey field-ref="ChildKId"/>
            </reference-descriptor>
             -->
                
</class-descriptor>


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Help--> circular reference stucks even when cache is used.

Posted by Sami Altundağ <sa...@genelsigorta.com>.


Submitting the problem without giving the code where it stucks I guess I
made a mistake.  I also added the code below.  Sorry for this double
submit.



   
            Criteria subCrit = new Criteria();
            subCrit.addEqualTo("kartoteksId", id);
            Query query = QueryFactory.newQuery(KartoteksImpl.class,
subCrit);

            KartoteksImpl kartoteks  =
(KartoteksImpl)broker.getObjectByQuery(query);
            broker.retrieveAllReferences(kartoteks);
            
 
Thanks,   


Sami Altundag


-----Original Message-----
From: Sami Altundağ [mailto:saltundag@genelsigorta.com] 
Sent: Friday, March 26, 2004 8:09 PM
To: ojb-user@db.apache.org
Subject: Help--> circular reference stucks even when cache is used.

 
I am using rc5. Following configuration stucks on some records.
 
 
I used
ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCachePerBrokerImpl as
the object cache but it didnt solve the problem. 
 
 
Any help is welcome.
 
 
Sami Altundag
 
 
 
<class-descriptor class="com.musteri.pos.KartoteksImpl"
table="KARTOTEKS" schema="KARTOTEKS" >
            <field-descriptor name="KartoteksId" primarykey="true"
column="KARTOTEKSID" jdbc-type="BIGINT"  autoincrement="true"/>
        
 
            <collection-descriptor name="ChildIliskis"
element-class-ref="com.musteri.pos.IliskiImpl" auto-update="true"
auto-delete="true" auto-retrieve="false">
                        <inverse-foreignkey field-ref="ParentKId"/>
            </collection-descriptor>
            <collection-descriptor name="ParentIliskis"
element-class-ref="com.musteri.pos.IliskiImpl" auto-update="true"
auto-delete="true" auto-retrieve="false">
                <inverse-foreignkey field-ref="ChildKId"/>
            </collection-descriptor>
        
</class-descriptor>
 
 
<class-descriptor class="com.musteri.pos.IliskiImpl" table="ILISKI"
schema="KARTOTEKS"  >
            <field-descriptor name="IliskiID" primarykey="true"
column="ILISKIID" jdbc-type="BIGINT" autoincrement="true"/>
            <field-descriptor name="ParentKId" column="PARENTKID"
jdbc-type="BIGINT"/>
            <field-descriptor name="ChildKId" column="CHILDKID"
jdbc-type="BIGINT"/>
 
        <!--
 
            This part is in quota and doesnt affect the problem.
 
        
            <reference-descriptor name="ParentKartoteks" proxy="true"
class-ref="com.musteri.pos.KartoteksImpl" auto-update="false"
auto-delete="false"  auto-retrieve="true">
                        <foreignkey field-ref="ParentKId"/>
            </reference-descriptor>
        
            <reference-descriptor name="ChildKartoteks" proxy="true"
class-ref="com.musteri.pos.KartoteksImpl" auto-update="false"
auto-delete="false"  auto-retrieve="true">
                        <foreignkey field-ref="ChildKId"/>
            </reference-descriptor>
             -->
                
</class-descriptor>


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org