hibernate - Make Row Lock in process insert with multiple user -


i'm having issue when inserting data multiple user in project.

i using hibernate 3.6.9 , sql server 2008.

when user try insert data in 1 table, locks table transaction. , if user try insert data same table simultaneously, process must wait previous transaction remove lock, takes time.

i want set lock on particular row , not on whole table.

any idea how can please?

you need enable rowlock insert described here: http://www.techrepublic.com/article/control-sql-server-locking-with-hints/. however, may need deeper hibernate's documentation see if supported dialect sql server or there special api same purpose.

hope helps.


Comments