RE: How to listen for shutdown

2003-03-11 Thread Frank Lawlor
Let me try to explain this better, The problem seems to be that Tomcat is shutting down the asynchronous threads BEFORE I can cleanly tell them to shutdown (from my servlet contextDestroyed() method). I tried getting control with finalize() in the thread instance, but this didn't seem to get

RE: How to listen for shutdown

2003-03-11 Thread Filip Hanik
[mailto:[EMAIL PROTECTED] Sent: Tuesday, March 11, 2003 11:27 AM To: Tomcat Subject: RE: How to listen for shutdown Let me try to explain this better, The problem seems to be that Tomcat is shutting down the asynchronous threads BEFORE I can cleanly tell them to shutdown (from my servlet

RE: How to listen for shutdown

2003-03-11 Thread Shapira, Yoav
-Original Message- From: Frank Lawlor [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 11, 2003 2:27 PM To: Tomcat Subject: RE: How to listen for shutdown Let me try to explain this better, The problem seems to be that Tomcat is shutting down the asynchronous threads BEFORE I can cleanly tell

RE: How to listen for shutdown

2003-03-10 Thread Shapira, Yoav
To: 'Tomcat Users List' Subject: RE: How to listen for shutdown Hey Frank, I also thought that my ServletContextListener was being invoked 2 times, but in reality Tomcat was actually deploying me application 2 times. I posted a question regarding this a while back and never resolved it. When I

RE: How to listen for shutdown

2003-03-10 Thread Frank Lawlor
Thanks for all the responses. I have another question about shutdown. My app has several asynchronous threads which it spins off. I need to get them shut down cleanly. These threads are not servlets and if I add a listener spec to web.xml for them I get the startup message:

RE: How to listen for shutdown

2003-03-10 Thread Shapira, Yoav
:[EMAIL PROTECTED] Sent: Monday, March 10, 2003 1:45 PM To: 'Tomcat' Subject: RE: How to listen for shutdown Thanks for all the responses. I have another question about shutdown. My app has several asynchronous threads which it spins off. I need to get them shut down cleanly. These threads

RE: How to listen for shutdown

2003-03-10 Thread Filip Hanik
you can define a listener in web.xml that will catch the context.destroy Filip -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Monday, March 10, 2003 10:52 AM To: Tomcat Users List; [EMAIL PROTECTED] Subject: RE: How to listen for shutdown Howdy, Keep track

Re: How to listen for shutdown

2003-03-07 Thread Frank Lawlor
Thanks for the responses. I tried using ServletContextListener and added my code to the contextDestroyed() method. It never seems to get called. My servlet is listed in web.xml under a servlet tag and is initialized just fine. I also saw that there is a destroy() method which

RE: How to listen for shutdown

2003-03-07 Thread Shapira, Yoav
: Frank Lawlor [mailto:[EMAIL PROTECTED] Sent: Friday, March 07, 2003 1:12 PM To: 'Tomcat' Subject: Re: How to listen for shutdown Thanks for the responses. I tried using ServletContextListener and added my code to the contextDestroyed() method. It never seems to get called. My servlet is listed

Re: How to listen for shutdown

2003-03-07 Thread Frank Lawlor
I found the answer to my questions: Documentation on ServletContextListener: http://developer.java.sun.com/developer/technicalArticles/Servlets/servl etapi2.3/ In order to ge the servlet invoked, you need a listener tag, e.g., listener

RE: How to listen for shutdown

2003-03-07 Thread Scott, Sean
, March 07, 2003 12:29 PM To: Tomcat Subject: Re: How to listen for shutdown I found the answer to my questions: Documentation on ServletContextListener: http://developer.java.sun.com/developer/technicalArticles/Servlets/servl etapi2.3/ In order to ge the servlet invoked, you need

How to listen for shutdown

2003-03-06 Thread Frank Lawlor
I've looked through a lot of documentation, forums and the Jakarta site and cannot find any documentation that tells me how my Tomcat application can get notified when Tomcat gets a shutdown. I have cleanup I need to do. I would appreciate any pointers to documentation or the correct

Re: How to listen for shutdown

2003-03-06 Thread Justin Ruthenbeck
See javax.servlet.ServletContextListener ... this provides a hook so that the container can notify your app anytime your app's context is initialized or destroyed. justin At 11:57 AM 3/6/2003, you wrote: I've looked through a lot of documentation, forums and the Jakarta site and cannot find

Re: How to listen for shutdown

2003-03-06 Thread Tim Funk
You can either use a LifeCycleListener to be tomcat specific http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/context.html or Serlvet api specific with ServletContextListener http://jakarta.apache.org/tomcat/tomcat-4.1-doc/servletapi/index.html -Tim Frank Lawlor wrote: I've looked through