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.
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.
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.