emmanuel wrote:
If you use explicit pessimistic locking it will be worse.
The locking are used by MSSQL depending on the JDBC isolation level you choose.
I have many threads which select, update, insert the same or new data from the same table, that's why i need pesimistic locking(i don't want that 2 threads select the same message, could you say how can i do it without pesimistic locking ? ).
It works good in Oracle but in MSSQL as i said there're deadlocks or 2 threads working with the same data.
In Oracle i use select ... for update and also oracle has row locking model.
I want to make the same pesimistic row locking with MSSQL and in other situation i want "select ... with (nolock) ..."
Could you say it's possible with Hibernate or i have to create own MS SQL dialect ?
Also if you give me a link to article about mssql locking and JDBC isolation level, i'll say big thank to you :) (I'm newbie in MSSQL)
Thank's