Bug 55125 - Tomcat does not shut down if LifecycleListener throws an exception
Summary: Tomcat does not shut down if LifecycleListener throws an exception
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 7
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 7.0.41
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-21 11:23 UTC by Glyn Normington
Modified: 2013-06-23 20:13 UTC (History)
0 users



Attachments
Logs (7.17 KB, text/plain)
2013-06-21 11:23 UTC, Glyn Normington
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Glyn Normington 2013-06-21 11:23:54 UTC
Created attachment 30467 [details]
Logs

I needed to shut down Tomcat if an application fails to start. I was advised that a LifecycleListener could shut down Tomcat by throwing an IllegalStateException from its lifecycleEvent method. However, this produces severe errors in the logs, but Tomcat does not shut down.

I saw this behaviour on Tomcat 7.0.41 and 7.0.40 using the test web application from here:

https://github.com/cloudfoundry/java-test-applications

and v1.0.0 of the listener from here:

https://github.com/cloudfoundry/java-buildpack-support

(v1.1.0 of the listener was re-coded to halt the JVM).

I attach catalina.out.

Mark Thomas suggested I raise this bug, so he believes that Tomcat should shut down.
Comment 1 Mark Thomas 2013-06-23 20:13:35 UTC
This has been fixed in trunk and 7.0.x and will be included in 7.0.42 onwards.