if it the whole domain you want to restart and you are sure about what you want to do then as far as I know you can achieve it by including a small script in your application and interfacing it wherever required.
[Message sent by forum member 'anzy' (anzy)]
http://forums.java.net/jive/thread.jspa?messageID=299803