how can I handle shutdown event in Tomcat 4.x ? Now I use JVM's shutdown hook, but I would like to use container's event. I think that MBeans have relation to such things, but I never used it before. Am I right related MBeans? Is there any examples of container's lifecycle traking, any URL ?