On 28/08/2020 20:54, Christopher Schultz wrote: > Calder, > > On 8/27/20 18:23, calder wrote: >> On Thu, Aug 27, 2020, 16:16 Christopher Schultz < >> ch...@christopherschultz.net> wrote: > >> [ snip ] > >> If you want to *kill* the application and it won't shut down on >> its >>> own, SIGKILL is the answer. But that's not a great way to shut >>> down an application /in general/ because the application might >>> want/need to do something convenient on shutdown (flush caches, >>> save state, etc.). > > > >> SIGTERM is the polite way to ask an application to shut down. A JVM >> will respond to this signal. (SIGHUP will also initiate a shut >> down, but TERM is preferred). Using TERM will cause the shutdown >> hooks to initiate. > >> As Chris states, SIGKILL is a last resort (hooks are not called). > > If you send a SIGTERM to a Tomcat process, your application's > ServletContextListeners and stuff like that will not run.
Yes it will. Tomcat will shutdown cleanly (after cleanly shutting down any running web applications). > Sure, you > can register shutdown-hook, but ... eew. That's like, AWFUL, man. You mean like Tomcat already does? Applications don't/shouldn't do this because Tomcat has already done so. Mark > > -chris > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org