Hibernate version:
2.0.3
Name and version of the database you are using:
MySQL 4.2
HI,
I've got a concurrency problem when I am modifying same DO in diff. threads with different hibernate session. Basically, both threads have their own hibernate session, both thread may update the DO based on the current state of the DO. However, when both threads loaded to objects, and one thread has commited the change, the other thread cannot get the latest DO state anymore (Because of the object already loaded to session cache).
What should be the proper way to handle this concurrency problem? Application Locking Mechanism? Refresh the object everytime I want to get the latest state of the object?...
Many Thanks,
Germen
|