addShutdownHook

public void addShutdownHook()

Makes the JVM shut down the service when it is shutting down itself.

Call this method when running the service in a separate JVM.