Writing a long lived Java class that can be stopped from a different JVM
<p>I am looking for any tutorial/example that shows the best practices for one to write a standalone Java class that will run like a server (w/o exiting) and can be stopped by issuing another command from a different invocation of the JVM (sort of like a Tomcat server). Is the best way to look for classes in java.util.concurrent as there are some interesting classes there such as CountDownLatch? An example would be really helpful. Thanks.</p>
