I want to leverage get_lock() function of mysql as a global lock, but it looks like impossible as I also use JPA as my database layer. Because get_lock() is connection based that means you have to lock/unlock using the same connection, however, there is no native way to retrieve a JDBC connection from JPA. Does that mean get_lock()/release_lock() is totally impossible in JPA?
I don’t like unwrap to underlying JPA implementation as it’s not portable.
I want to leverage get_lock() function of mysql as a global lock, but it
Share
I finally solved this issue by using a JDBC datasource as well as JPA