tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier>
Subject Re: Tomcat Shutting Down by Itself?
Date Tue, 27 Jul 2010 22:30:44 GMT
Caldarale, Charles R wrote:
>> From: André Warnier []
>> Subject: Re: Tomcat Shutting Down by Itself?
>> Would there be any specific way to catch a call to system.exit() ?
> 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 ?

> 2) Use System.getRuntime().addShutdownHook() to trigger your own thread when the JVM
does decide to exit.
Assuming the OP does not have easy access to the running application, would that mean 
adding another application which is launched at Tomcat start, and runs the above ?
Or do you need to do this in the application itself ?

No other way from "outside", apart from the SecurityManager ?

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message