I have a C # application with NHibernate that needs to perform some operations on a SQL Server database.
Our goal is to run this application several times on the same computer, as well as on other machines.
In fact, the application inserts the row into the SQL table and checks if the first row with the minimum date is the row with the correct PID and the machine so that the application sets the lock and does the job.
We have problems with this logic because the application must also remove the lock of other applications if the application in which the lock is stored is broken.
Any hint at changing the architecture of the lock?
The problem is that the application can run on multiple computers.
source
share