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.