[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-5275) Criteria.setLockMode does not work correctly

Steve Ebersole (JIRA) noreply at atlassian.com
Thu Jan 5 09:49:16 EST 2012


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-5275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=44957#comment-44957 ] 

Steve Ebersole commented on HHH-5275:
-------------------------------------

Chad, well they are related in terms of that they all deal with acquisition of pessimistic locks, but beyond that they are not related.  Those other ones require restructuring the SQL statements which probably will not happen until we move away from strictly string-based SQL build-up.  Thats [this version|https://hibernate.onjira.com/browse/HHH/fixforversion/10690] but thats quite a ways off.  Of course I would accept any pull requests that address this within the string based build-up ;)

Graeme, we can discuss it in the developer meeting next week.  Feel free to join, its open.  We do it every Tuesday at 8am Central US time.  I would be open to one more 3.6 release in conjunction with 4.0.1, but no more.  And the scope would have to be less since we cannot touch APIs and whatnot, so redoing the "alias specific lock mode" would be off the table for example.

> Criteria.setLockMode does not work correctly
> --------------------------------------------
>
>                 Key: HHH-5275
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5275
>             Project: Hibernate Core
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.5.2, 3.5.3
>         Environment: Hibernate 3.5.2, Oracle 10 (using org.hibernate.dialect.Oracle10gDialect
>            Reporter: Björn Moritz
>            Assignee: Steve Ebersole
>            Priority: Minor
>             Fix For: 4.0.1
>
>         Attachments: AnotherOracle10gDialect.java, My_Oracle10Dialect.java, My_Oracle10Dialect.java, TestCase.zip
>
>          Time Spent: 2h 19m
>
> The LockMode set via Criteria.setLockMode does not generate a ' for update' SQL statement. In the org.hibernate.dialect.Dialect class only the LockOptions are used for determining a possible addition to the SQL statement if using pessimistic locking. This behaviour is different from Hibernate 3.1.3.
> In the supplied TestCase two threads are reading the same database record; one of those threads should use pessimistic locking thereby blocking the other thread. But both threads can read the database record causing the test to fail.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       



More information about the hibernate-issues mailing list