0

Most servers like Jetty or Weblogic provide some sort of mechanism to start or shutdown the server via a call (sometimes over jmx). Can always to keep stuff running from main:

public static void main(String args[]) {
  try {
     Setup Spring context.....

     Object lock = new Object();
     synchronized (lock) {
          lock.wait();  
     }
  } catch (Exception e) {
     e.printStackTrace();
  }
}

And do a kill on the process PID. But thought there might a nice open-source solution hanging around in cyber space that adds JMX bells and whistles.

CAMOBAP
  • 5,523
  • 8
  • 58
  • 93
Matthew Campbell
  • 1,864
  • 3
  • 24
  • 51

1 Answers1

1

Maybe you want to start by looking at a combination of Commons Daemon and Commons Launcher. Not sure if there are any JMX bells and whistles in there, but this provides hooks into your OS management interface for server processes.

Thilo
  • 257,207
  • 101
  • 511
  • 656