The second part of the question is... is there an idiom for the 'shutdown' half of this equation (that is relatively simple to implement)? I think the Tomcat shutdown script uses the fact that the Tomcat executable listens on a certain secret ( but known ) port for a 'shutdown signal'.
I'm dragging this up again, because it's on my radar at work again.
Basically, I'm using the Quartz package to provide a server-wide scheduling service. It's basically cron, only accessible from java applications through a very nice API.
The problem is that I have written a small 'launcher' class that will start my scheduler, but when this class is forcefully 'terminated' (in Unix, by ctrl-C'ing the XWindow), then my scheduler goes away.
So the answer would seem to be using some OS-level script trickery. like using nohup and the & to get my prompt back.