getForUpdateString is not correct in DB2Dialect; session.lock doesn't work as expected.

Description

The correct getForUpdateString for DB2 should be "for update with rr"

see:
http://opensource.atlassian.com/projects/hibernate/browse/HB-1032

DB2 will release all locks created in a result set if the isolation level is lower than TRANSACTION_SERIALIZABLE (RR in DB2).

Locks and concurrency control in DB2:
http://publib.boulder.ibm.com/infocenter/db2help/topic/com.ibm.db2.udb.doc/admin/c0005266.htm
"
The duration of row locking varies with the isolation level being used:

  • UR scans: No row locks are held unless row data is changing.

  • CS scans: Row locks are only held while the cursor is positioned on the row.

  • RS scans: Only qualifying row locks are held for the duration of the transaction.

  • RR scans: All row locks are held for the duration of the transaction.
    "

Environment

3.1.3, DB2

Activity

Show:
Steve Ebersole
March 21, 2011, 7:05 PM

Bulk closing stale resolved issues

Assignee

Diego Plentz

Reporter

Lari Hotari

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure