Hi,
I have Restlet 2.3.12 setup with embedded jetty today. I want to have a graceful shutdown. That means that I would like to first send SIGTERM (i.e. kill) and then after a grace period send SIGKILL (i.e. kill -9). On the SIGTERM I want to stop accepting connections and only start handling the current connections. And at SIGKILL kill the application in total. Today from my tests SIGTERM will just kill the application.
I guess this can be down by adding a shutdown hook from Java and invoking a method on the wrapped server?
But what is the preferred way to do this with Restlet and embedded Jetty?
Regards,
/Robert