0

I am using MS SQL server..

How do we enable row level locking in hibernate?

I am using a combo of Spring+hibernate..

I have a requirement where in there would be multiple threads inserting data into the same table.

Deepak Kumar
  • 843
  • 1
  • 7
  • 19
  • This question has been answered in other threads. http://stackoverflow.com/questions/10648448/i-need-row-level-locking – S.F May 30 '16 at 23:40

1 Answers1

0

Probably you are looking for Pessimistic locking mode in hibernate. Please get the more reference here.

https://docs.jboss.org/hibernate/orm/4.0/devguide/en-US/html/ch05.html

If your table type is InnoDB then you will get the row level locking, MYISAM table type only support table locking.

Vijendra Kumar Kulhade
  • 2,217
  • 3
  • 15
  • 25