Re: Shutdown via REST PUT request

2014-04-23 Thread Fabian Mandelbaum
I had to do System.exit(0) too to completely finish the thing, besides shutting down Restlet components and possibly other services, else Restlet itself is shut down, but the JVM that fired the app is not. I'm using Apache's Commons Daemon to 'daemonize' the application, and in the latest versions

Re: Shutdown via REST PUT request

2014-04-23 Thread Tim Peierls
You can call Component.stop() asynchronously with a delay, so that the PUT handler has a chance to complete. (Although I think POST captures the intent better: You're POSTing a request to shut down the component.) It could be as simple as this: @Post public String postShutdown(final String shutdo

Shutdown via REST PUT request

2014-04-23 Thread Sean Johnston
I've a standalone application that I'm trying to implement a shutdown for. Initially I had this as a very simple Socket listen. However, wanting to put a more proper API in place I'm looking at REST and RESTlet is looking good. I've got it mostly working. That is, I have something that handles aut