Hi, When running code in a webapp, I know it is possible to detect an undeploy of the webapp, or shutdown of Tomcat, using a ServletContextListener. But how about code running outside the webapp?
The background for this is that we have written a plugin to a CMS, and this plugin exists in the common/global classpath. The CMS calls the plugin on certain occasions, triggered by some custom scheduling logic, and if we are unlucky our plugin gets called during a shutdown of Tomcat giving us strange errors that result in an unnecessary error report email being sent. So what I would like to do is to add some check in our plugin, to avoid doing anything if Tomcat is in the process of shutting down. But is this possible, without some ugly hack? Regards /Jimi