[hibernate-issues] [Hibernate-JIRA] Created: (HHH-5009) Support NOWAIT for "SELECT ... FOR UPDATE" with JPA interfaces

Sergey Vladimirov (JIRA) noreply at atlassian.com
Sun Mar 14 22:35:50 EDT 2010


Support NOWAIT for "SELECT ... FOR UPDATE" with JPA interfaces
--------------------------------------------------------------

                 Key: HHH-5009
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5009
             Project: Hibernate Core
          Issue Type: Improvement
    Affects Versions: 3.5.0-CR-2
         Environment: Oracle / Derby
            Reporter: Sergey Vladimirov


Test case description:
 - DERBY dialect extended to add /* +NOWAIT */ SQL comment to check if it's actually used.
 - if it's working, log should contain
 --- "org.hibernate.SQL              DEBUG select entity0_.id as id0_0_, entity0_.value as value0_0_ from entities entity0_ where entity0_.id=? for update with rs /* +NOWAIT */"
 -- but currently it
 --- "org.hibernate.SQL              DEBUG select entity0_.id as id0_0_, entity0_.value as value0_0_ from entities entity0_ where entity0_.id=? for update with rs"

It seems LockOptions (like "javax.persistence.lock.timeout") are lost when converting from JPA to Hibernate. The possible place of error, from my point of view, is loadFromDatasource() (DefaultLoadEventListener:499), where persister is loaded depending only on LockMode without paying attention to lockOptions (including timeout).

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

        


More information about the hibernate-issues mailing list