RE: detecting the shutdown of tomcat in a servlet

2004-08-02 Thread Shapira, Yoav
Hi, According to your suggestion it is advisable not to use ServletContextListener if we are using load on startup feature. And we just need to create a separate servlet for destroying daemon threads. Say what? That's not what I said or at least not what I meant ;) A ServletContextListener is

RE: detecting the shutdown of tomcat in a servlet

2004-07-30 Thread Jignesh Patel
Hi Yoav, According to your suggestion it is advisable not to use ServletContextListener if we are using load on startup feature. And we just need to create a separate servlet for destroying daemon threads. Please provide us your valuable thoughts. -Jignesh On Wed, 2004-07-28 at 08:57,

Re: detecting the shutdown of tomcat in a servlet

2004-07-28 Thread Rodrigo Ruiz
There is more than one way :-) - From within a servlet, add a shutdown hook with Runtime.getRuntim().addShutdownHook() - Create a ServletContextListener, and implement the clean stop of your daemon in the listener contextDestroyed() method - Create an initialization servlet, and implement the

RE: detecting the shutdown of tomcat in a servlet

2004-07-28 Thread Shapira, Yoav
Hi, Excellent answer by Rodrigo Ruiz. I wanted to correct one tiny part, and for Tomcat it's a theoretical correction only, but since this a common mistake and a blemish on an otherwise great post: load-on-startup servlets are initialized on startup by the container. But that doesn't mean they