> From: André Warnier [mailto:a...@ice-sa.com] > Subject: Re: Tomcat Shutting Down by Itself? > > > 1) Enable a SecurityManager (usually a major pain). > > Because you would need to authorise everything else that this > application /might/ be doing, except system.exit(), right ?
Correct. Getting the settings right might involve much experimentation and a few application errors along the way - it all depends on what the webapp needs to do. > > 2) Use System.getRuntime().addShutdownHook() to trigger > > your own thread when the JVM does decide to exit. > > would that mean adding another application which is launched > at Tomcat start, and runs the above ? Yes, that would probably be the easiest way. > Or do you need to do this in the application itself ? No, since the shutdown hook applies to the JVM, not individual webapps. > No other way from "outside", apart from the SecurityManager ? Not that I can think of right off the bat. Others might know easier tricks specific to Tomcat. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org