Relative Content

Tag Archive for springjpaspring-data-jpaspring-data

How to dynamically set lock in JPA

I have below simple example. I want the JPA method findByName to dynamically set lock. In the changeUserNames method I want it set a lock. In getUsers method I don’t want it to set lock. How can I achieve this?