Re: Shutdown Hook in Tomcat 5.5.26

2008-03-31 Thread Ho Fat Tsang
Hello Chris, Thank for your reply and yes. It seems System.out is subtle at that moment and it is not a good indicator for validation. I have re-written something else and it works fine. But let me elaborate what i want to achieve. I would like to deliver a alert email when the JVM

Re: Shutdown Hook in Tomcat 5.5.26

2008-03-28 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Twinsen, Ho Fat Tsang wrote: | public class TestThread extend Thread | { | public void run() | { |System.out.println(Invoking shutdown); | } | } | | The hook is executed ONLY when i press CTRL+C using console but it is

Shutdown Hook in Tomcat 5.5.26

2008-03-27 Thread Ho Fat Tsang
Dear all tomcat expert, I am falling a scenario which my shutdown hook has not been executed when the tomcat stop normally. I.e. through the SHUTDOWN script / SHUTDOWN command / NT services shutdown. Tomcat looks everything when shutdown but nothing related to shutdown hook has been called.