Jimmy’s Blog

Tag: lock

Java Application – Make sure only single/one instance running – with File Lock and ShutdownHook

by jimmy on Jul.21, 2008, under English, Java, Programming

Often we want to make sure that only 1 instance our application running.
Because something terrible could happen when more than 1 instance running (for example the whole server would exploded and that would make you fired ;) )

Nevertheless what the reason, one of the way to make this happen is by creating a lock file as a sign that an instance is currently running.
So you application will have this flow: (continue reading…)

17 Comments :, , , , , , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...