[jboss-jira] [JBoss JIRA] Created: (JBAS-3679) BMP entitybeans cause db-deadlocks

Onno de Groote (JIRA) jira-events at jboss.com
Thu Sep 21 02:34:01 EDT 2006


BMP entitybeans cause db-deadlocks
----------------------------------

                 Key: JBAS-3679
                 URL: http://jira.jboss.com/jira/browse/JBAS-3679
             Project: JBoss Application Server
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: Transaction Manager
    Affects Versions: JBossAS-3.2.7 Final
         Environment: windows 2003, sun jvm 1.4.2_06, INet Opta JDBC driver 6.04, SQLSERVER 2000
            Reporter: Onno de Groote
         Assigned To: Adrian Brock


when using local-tx datasources with no transactionisolation-level specified, it looks like jboss sets it to repeatable-read or higher. The problem with this situation is that in high concurrency situations, two threads using the same entity-bean ( with or without same primary-key ) cause deadlocks in SQLServer. The reason for this is that de select queries in the findby and ejbload code set S-locks on the indexes in the database, thereby blocking any update query of a different thread. In the situation that thread-1 first performs the findby and ejbload, causing S-locks, after which thread-2 does the same, after which thread-1 tries ejbstore, which blocks because of the S-locks of thread-2. Then thread-2 tries the ejbstore, which in turn is blocked by the S-locks of thread-1. SQLServer detectes a deadlock and selects a deadlock victim and one transaction fails. In this case there should not have been a problem so the transaction-failure is incorrect and only caused by the wrong transactionisolation level

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       




More information about the jboss-jira mailing list