Martin Nedbal commented on Bug HHH-8161

After more research it looks like this "delayed" locking was introduced in version 3.5.0. We've been using ancient 3.3.1 which does behave differently.

Hibernate 3.3.1:

Quote:
2013-04-19 15:21:34 CEST LOG: duration: 0.005 ms execute S_1: BEGIN
2013-04-19 15:21:34 CEST LOG: duration: 0.061 ms execute <unnamed>: update TestLock set version=$1 where testLockId=$2 and version=$3
2013-04-19 15:21:34 CEST DETAIL: parameters: $1 = '1', $2 = '13100', $3 = '0'
2013-04-19 15:21:34 CEST LOG: duration: 0.053 ms execute <unnamed>: delete from TestLock where testLockId=$1 and version=$2
2013-04-19 15:21:34 CEST DETAIL: parameters: $1 = '13100', $2 = '1'
2013-04-19 15:21:34 CEST LOG: duration: 5.326 ms execute S_2: COMMIT

Hibernate 3.5.0

Quote:
2013-04-19 15:27:53 CEST LOG: duration: 0.006 ms execute S_1: BEGIN
2013-04-19 15:27:53 CEST LOG: duration: 0.053 ms execute <unnamed>: delete from TestLock where testLockId=$1 and version=$2
2013-04-19 15:27:53 CEST DETAIL: parameters: $1 = '13200', $2 = '0'
2013-04-19 15:27:53 CEST LOG: duration: 0.041 ms execute <unnamed>: update TestLock set version=$1 where testLockId=$2 and version=$3
2013-04-19 15:27:53 CEST DETAIL: parameters: $1 = '1', $2 = '13200', $3 = '0'
2013-04-19 15:27:53 CEST LOG: duration: 0.025 ms execute S_3: ROLLBACK

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira