"James Harig" <[EMAIL PROTECTED]> wrote on 12/07/2005 
12:50:06 PM:

> >> 
> >> To facilitate these items, you will need some method of informing 
> >> your webapplication that the server is going to be shutdown.  One 
> >> way to do this would be to set a flag in the application context; 
> >> another way is to create a lock file; yet another way is to set a 
> >> flag in a database. 
> 
> >Could you not do this via a ServletContextListener..?
> 
> No, I don't believe that would work.  The ServletContextListener.
> contextInitialized(..) method would be invoked as part of the web 
> app context being shut down; but there is no way to stop the 
> shutdown process once it starts.
> 

The API for contextDestroyed says "Notification that the servlet context 
is about to be shut down. ". Going by the "about to be" I would have 
thought the contextDestroyed method would be executed first?
Geeta

Reply via email to