[
https://hibernate.onjira.com/browse/HHH-1512?page=com.atlassian.jira.plug...
]
Steve Ebersole commented on HHH-1512:
-------------------------------------
In reference to my last comment, this specific DB2 documentation is @
http://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=%2...
Especially note:
{quote}
To take advantage of the possibly improved performance of FETCH operations while
guaranteeing that selected data is not modified and preventing some types of deadlocks,
you can specify FOR READ ONLY in combination with the optional syntax of USE AND KEEP ...
LOCKS on the isolation-clause.
{quote}
Again, keeping in mind that "selected data is not modified" is specifically in
regards to positioned updates.
Problem to lock a row in a DB2 database with LockMode UPGRADE
-------------------------------------------------------------
Key: HHH-1512
URL:
https://hibernate.onjira.com/browse/HHH-1512
Project: Hibernate ORM
Issue Type: Bug
Components: core
Affects Versions: 3.1
Environment: DB2 v8.2, Hibernate 3.1 and higher
Reporter: Peter Potthoff
Assignee: Steve Ebersole
Fix For: 4.1.3
Attachments: locks.txt
Original Estimate: 1h
Remaining Estimate: 1h
Using the LockMode UPGRADE to lock a row in the database, this will result in
a sql-statement: select ID from <schema>.<table> where ID =? and version =?
for read only with rs
This statement produces a shared lock and cannot be used for pessimistic locking because
this kind of lock won't stop a concurrent thread from accessing the data.
The source of the class DB2Dialect.java was changed from release 1.34 to 1.35:
http://cvs.sourceforge.net/viewcvs.py/hibernate/Hibernate3/src/org/hibern...
and from 1.33 to 1.34
http://cvs.sourceforge.net/viewcvs.py/hibernate/Hibernate3/src/org/hibern...
Please take a look at: HHH-378 and
http://forum.hibernate.org/viewtopic.php?t=954639&highlight=db2+lock+...
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira