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

Adrian Brock (JIRA) jira-events at jboss.com
Fri Sep 22 05:43:01 EDT 2006


     [ http://jira.jboss.com/jira/browse/JBAS-3679?page=all ]

Adrian Brock closed JBAS-3679.
------------------------------

    Resolution: Rejected
      Assignee:     (was: Adrian Brock)

Wrong.

If you don't specify the isolation, neither does JBoss.
It uses whatever is defined by the driver/database.

This is all explained in the documentation.

> 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
>
> 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