locking - Java inter-process mutex -


i need implement kind of inter-process mutex in java. i'm considering using filelock api recommended in thread. i'll using dummy file , locking in each process.

is best approach? or built in standard api (i can't find it).

for more details see below:

i have written application reads input files , updates database tables according finds in them (it's more complex, business logic irrelevant here).

i need ensure mutual exclusion between multiple database updates. tried implement lock table, unsupported engine i'm using. so, want implement locking support in application code.

i went filelock api approach , implemented simple mutex based on:

all processes use same dummy file acquiring locks.


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -