Hi All,
I googled long time around, but can not find any answer for my Problem till now. Below is description of the problem:
I Locked a data record in my database with the hibernate method:
Code:
session.lock(element, LockMode.UPGRADE);
If I start my application twice the record is locked an can't be edited, but the application blocks while trying to set the lock a second time on the same DB record.
I don't know how to check if a db record is locked or not to send a message to the user and don't try to lock the record another time.
I tried the method:
Code:
session.getCurrentLockMode(element);
but it allways return LockMode.READ, when the record is locked or was never locked.
I hope you can help me.
I used
MySQL as DBMS.
thanks
Code: