Hi,
we are using OJB 1.0.1 and we have found a very strange issue:
We have a class "User" and a class "Group". Now we have a quite common
and simple use-case that a User becomes member of a Group. The code for
this is like:
User user = ...;
Group group = ...;
user.addGroup(group);
pb.beginTransaction();
pb.store(user);
pb.commitTransaction();
So far so good. But now it gets weird: If one has many users the
pb.store()-part takes ages. Java and the database (in my case: mysql)
take a very large part of the cpu-performance.
Is this a known issue with 1.0.1 so we can change ojb? Or are we doing
something completely wrong? I suppose it has something to do with the
auto-*-settings, but we are using those in other use-cases as well and
have no problems there.
The class-descriptors are defined like (fields have been ommited):
<class-descriptor class="kos.wnetz.om.User" table="tk_user">
...
<collection-descriptor
name="groups"
collection-class="org.apache.ojb.broker.util.collections.ManageableArrayList"
element-class-ref="kos.wnetz.om.Group"
auto-retrieve="true"
auto-update="object"
auto-delete="link"
proxy="false"
indirection-table="tk_group_user">
<fk-pointing-to-this-class column="GRUS_User"/>
<fk-pointing-to-element-class column="GRUS_Group"/>
<attribute attribute-name="reverseCollection"
attribute-value="users"/>
</collection-descriptor>
</class-descriptor>
<class-descriptor class="kos.wnetz.om.Group" table="tk_group">
...
<collection-descriptor
name="users"
collection-class="org.apache.ojb.broker.util.collections.ManageableArrayList"
element-class-ref="kos.wnetz.om.User"
auto-retrieve="true"
auto-update="object"
auto-delete="link"
proxy="true"
indirection-table="tk_group_user">
<fk-pointing-to-this-class column="GRUS_Group"/>
<fk-pointing-to-element-class column="GRUS_User"/>
<attribute attribute-name="reverseCollection"
attribute-value="groups"/>
</collection-descriptor>
</class-descriptor>
I am glad for any help
With regards
Tino
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]