Here is my problem in brief:
I have a large number (more than 5000) of entity beans. By performing a 'select' over them, I obtain a set of primary keys.
Then, for each key, I lookup the bean and perfom 2 set() operations on the bean.
The problem is the following: the lookup time is huge, almost half a second! But if I comment out the set() operations, then the time goes to 0.
It seems somehow that the previous set() affects the following lookup(). How can this be?
PS: the machine I use is a p4with 1GBram.
Ok, here is what actually happened: I was in a transaction but the parameter "sync-on-commit-only" was set to false.
If you set it to true, then all commits will be made at the end of the transaction.