Skip to content

About

Prevent your application from starting more than once on the same machine

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SingleInstanceLock

Prevent your application from starting more than once on the same machine


License Java Version Apache Maven ready


##Example

	SingleInstanceLock.setApplicationId("some_unique_application_id");

    boolean locked = SingleInstanceLock.lock();
    
    if (locked) {
    	//Lock acquired
    } else {
    	//Other application instance has lock
    }
    
    //...

    SingleInstanceLock.release();
    

Built with Maven

This project can be built with Maven

Maven command:

$ mvn clean install

pom.xml entry in your project:

<dependency>
	<groupId>ch.thn.app</groupId>
	<artifactId>singleinstancelock</artifactId>
	<version>0.0.1-SNAPSHOT</version>
</dependency>

About

Prevent your application from starting more than once on the same machine

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages