tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Caldarale, Charles R" <Chuck.Caldar...@unisys.com>
Subject RE: Shutdown Hooks not firing when tomcat is shutdown from within a webapp
Date Tue, 07 Feb 2012 18:38:38 GMT
> From: Andrew Kujtan [mailto:akujtan@evertz.com] 
> Subject: Shutdown Hooks not firing when tomcat is shutdown from within a webapp

> OS: Windows 7  32bit
> Ver.: Apache Tomcat/7.0.25
> Jvm: 1.6.0_14-b08

Thanks for that. 

> I am attaching a shutdown hook from within my webapp to log 
> some info after tomcat shuts down,

That really doesn't sound like a good idea at all.  I would think you should be using a ServletContextListener.
 
> Can anyone tell me how to programmatically shut down tomcat 
> such that the hooks will still fire? 

There's no real provision for doing so, since that's not a decision a webapp should be making.
 There's always System.exit()...

 - 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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message