Hello, I have an application deployed to a Tomcat 8.0.22 using jre1.8.0_05 which uses the ServletContextListener to do something when Tomcat stops. This task takes about 45 seconds. This wasn't a problem until I learned that I could speed up the Tomcat 8 startup time by parallel instantiation of my webapps by adding the startStopThreads="2" attribute to the Host tag in the server.xml.
Now, when Tomcat stops, it seems to interrupt or stop my Thread, because it doesn't print out anything anymore (even a System.out.println isn't shown in the log so I don't think it is because just log4j is stopped). Why does Tomcat wait nicely with startStopThreads removed, and why can't he wait when I use startStopThreads? The behavior of killing webapps the hard way when using startStopThreads isn't documented also. Regards, Daniel Migowski