Hi Emmanuel,
Thanks for the reply, but I already use transactions around this "critical section" and I experience concurrent modification problems.
If I have two threads, each running in a transaction, fetch the same entry and when the transactions end, both trying to commit the modified object to the DB.
If both threads hold the same Java object it would require using object synchronization (does it work well in jboss?). If they are different objects, how can hibernate detect the concurrent modification and allow the first transaction to commit and the second transaction to fail (we don't use optimistic locks with versioning)?
Genady
|