tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Migowski <dmigow...@ikoffice.de>
Subject startStopThreads=2 lets Tomcat kill my threads
Date Mon, 04 May 2015 10:58:44 GMT
Hello,

I have an application deployed to a Tomcat 8.0.5 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 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


IKOffice
UNTERNEHMENSSOFTWARE

IKOffice GmbH

Daniel Migowski


Mail:

dmigowski@ikoffice.de<mailto:dmigowski@ikoffice.de>

Marie-Curie-Straße 1

Tel.:

+49 (0)441 21 98 89 52

26129 Oldenburg

Fax.:

+49 (0)441 21 98 89 55

http://www.ikoffice.de<http://www.ikoffice.de/>

Mob.:

+49 (0)176 22 31 20 76



Geschäftsführer:

Ingo Kuhlmann, Daniel Migowski

Amtsgericht Oldenburg:

HRB 201467

Steuernummer:

64/211/01864




Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message