Controlling tomcat with supervisor

view story

http://serverfault.com – Is there a way to "gracefully" shutdown tomcat when controlling via supervisor? My understanding is Tomcat's shutdown.sh script talks to tomcat on the shutdown port to initiate a graceful shutdown. Supervisor doesn't seem to have a way to specify a shutdown "command", only using signals. Has anyone successfully used supervisor with tomcat? Also, since tomcat's startup.sh script initiates the java process, I've been copying the resulting java command directly into supervisor, but this isn't as nice as using the startup.sh script because of all the environment setup. Is there a way to get s (HowTos)