The following comment has been added to this issue:
Author: Dieter Bogdoll
Created: Thu, 6 Nov 2003 2:30 AM
Body:
To lock the data of a SELECT you have to specifiy for each table the table hints HOLDLOCK,XLOCK.
SELECT ... FOR table_name WITH (HOLDLOCK,XLOCK)
If the transaction isolation level is SERIALIZABLE or a user tries to do a SELECT with the table hint SERIALIZABLE on the same data he will be locked until the first transaction is commited/aborted.
So the user has to do two things to work with looks in MS SQLServer:
1. Apply the necessary table hints for the SELECTs
2. Either change the isolation level to SERILIZABLE or apply the table hint SERIALIZABLE to SELECTSs which should block.
---------------------------------------------------------------------
View the issue:
http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-456
Here is an overview of the issue:
---------------------------------------------------------------------
Key: HB-456
Summary: Select for update isn't supported for MS SQLServer
Type: Improvement
Status: Unassigned
Priority: Major
Project: Hibernate2
Assignee:
Reporter: Dieter Bogdoll
Created: Wed, 5 Nov 2003 3:51 AM
Updated: Wed, 5 Nov 2003 3:51 AM
Environment: MS SQLServer 6.5, 7, 2000
Description:
MS SQLServer doesn't support the "FOR UPDATE" keyword within the SELECT statement.
But it is possible to create the same effect with table hints.
Hibernate just add "FOR UPDATE" behind the select to lock objects.
This has to be changed for the MS SQLServer.
After each table name the correct table hints has to be written.
---------------------------------------------------------------------
JIRA INFORMATION:
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
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
|