-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Treecache - ont-to-may problem
PostPosted: Fri Jun 04, 2004 3:23 am 
Newbie

Joined: Fri Jun 04, 2004 2:52 am
Posts: 1
Hi,

I am using hibernate2, tomcat 4.1.27, struts and JbossCache Standalone without TxManager.

I have 2 classes with a one-to-many mapping.
a - one to many - b:
Code:
<class name="x.A" table="A">
<cache usage="transactional" />

<id name="id" column="AID" type="integer">
<generator class="sequence"/>
</id>
<property name="aa" column="AA" type="string" length="50" not-null="true"/>
<property name="bb" column="BB" type="string" length="3" not-null="true"/>
<set name="bs" inverse="true" lazy="true">
<cache usage="transactional" />
   
   <key column="AID" />
   <one-to-many class="x.B" />
</set>
</class>

<class name="x.B" table="B">
<cache usage="transactional" />

<id name="id" column="BID" type="integer">
<generator class="sequence"/>
</id>
<property name="aid" column="AID" type="integer" length="10" not-null="true"/>
<property name="cc" column="CC" type="string" length="50" not-null="true"/>
<property name="dd" column="DD" type="string" length="3" not-null="true"/>
<many-to-one name="a" class="x.A" column="AID" insert="false" update="false" />
</class>

When I update(hibernate session update) some of the "many" and refresh(hibernate session refresh) the "one" my java proccess gets a CPU-Usage of 100 % after 1 - 2 seconds.
The application ist still running for a few seconds, but very slow and is finally unreachable. -> Looks like an endless recursion to me.

When I use another cache like OsCache everythings works fine.
When I remove the <cache usage="transactional" /> in the one-to-many tag everything works fine.

So I think the problem is on the treecache side or the way, hibernate uses this cache.

any suggestions?

Thanks in advance.

kind regards.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.