Announcement Announcement Module
Collapse
No announcement yet.
Deadlock and isolation level Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Deadlock and isolation level

    Hello All.

    I have the following problem: I have two thread that invoke the same method - methodA(). First thread starts first transaction and lock some data for update, when second thread starts second transaction. The first transaction is suspended and the second transaction tries to update the same data that have been locked by the first transaction and deadlock exception happens.

    I try use
    Code:
    @Transactional(propagation=Propagation.REQUIRED, isolation=Isolation.SERIALIZABLE)
    but without change.

    In my case solution in that the second transactions starts after the first has been finished - good.
    How can I resolve this problem? I use Hibernate 3 and MySQL.
Working...
X