Thanks for the help. It turns out that a shutdown handler was not what I
needed. Shutdown handlers are only called after join() is called for
each thread handling a request, so my handler wasn't getting called
until after the servlet was exiting anyway. (Remember my issue was on an
action that could take a long time to exit.) My solution was to check
self.application().server().running each time through my loop to see if
the exit status was <= 2.
--john
John Dickinson wrote:
Where is the best, or recommended, place to call addShutDownHandler()?
I have an action that may take a while to exit (it polls a queue).
However, I do have a function that can be called to force the action
to exit. The problem I'm having is restarting the app server. It
doesn't want to exit until my action has finished executing. I'd like
to add my kill switch function so that when I stop the app server, it
doesn't hang until the action exits.
--John
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss