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
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,
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
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