Definitely a more portable suggestion.

Tim Funk <[EMAIL PROTECTED]> writes:

> Why is a kill done instead of a System.exit()?
> 
> Could instead a background daemon thread be launched, then be made to
> sleep for 30(?) second. If the thread wakes up then the tomcat has not
> exited properly and System.exit() can be called?
> 
> 
> Since this class would live in /common or /server - it should be
> allowed to call System.exit()? Then one could configure a new entry in
> <Server> to choose how long to wait before calling System.exit, for
> example:
> 
> 
> <Server port="8005" shutdown="SHUTDOWN" debug="0" shutdownWait="30">
> 
> Unless this seems like a bad idea - I can make an attempt to code and
> test it.
> 
> 
> -Tim
> 
> Costin Manolache wrote:
> > Craig R. McClanahan wrote:
> >
> 
> >>It is OK for web applications to start threads -- as long as the web
> >>application cleans up after itself when the application is shut down (the
> >>easiest way to detect that is to create a ServletContextListener and wait
> >>for the contextDestroyed() method of your listener to be called).
> >>
> >>The JVM running Tomcat shuts down when all non-daemon threads have been
> >>killed.  Tomcat properly cleans up all the threads that *it* creates -- it
> >>is up to your application to do the same.
> > I can backport the "-force" option from 3.3 - basically save the PID
> > and then use kill if tomcat doesn't shut down gracefully.
> 
> > Fact is many apps are not cleaning up - and having the whole server
> > hunged and unable to restart for one bad app is not good.
> 
> > Costin
> 
> > ---------------------------------------------------------------------
> 
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

-- 

Daniel Rall <[EMAIL PROTECTED]>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to