Re: PB.store extremely slow

2005-10-27 Thread Tino Schöllhorn

Hi,

just one more piece of information:

If I set auto-update="none" on either "groups" or "users" the storing is 
fast. So I think there is happening a "cycle" because a store on a users 
results in a store of a group which in turn results in a store of all 
users in that group.


I don't know if this is a bug or a feature ;-) What do you think?

Tino


Tino Schöllhorn wrote:

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):


...

 
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">
   



   
attribute-value="users"/>






...


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">
   



   
attribute-value="groups"/>




I am glad for any help

With regards
Tino



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



PB.store extremely slow

2005-10-27 Thread Tino Schöllhorn

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):


...

	 
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">










...

	 
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">








I am glad for any help

With regards
Tino


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]