Hi! ср, 13 янв. 2021 г. в 17:04, Romain Manni-Bucau <rmannibu...@gmail.com>: > > Drafted https://github.com/apache/tomcat/pull/400 in regards of that topic. >
Looks good thus far. Several notes: 1. Maybe others disagree, but I am OK with the default for "exitOnFirstListenerFailure" property being changed to "true". It is a rare use case, and I think that it is safe to fail early. The web application will fail to start anyway. 2. A better name? I do not like "exit**", because Tomcat does not exit here. It does not call "System.exit()" or anything like that. It is just a single web application that fails to start. Maybe something like "abortOnFirstListenerFailure". (There is org.apache.catalina.startup.EXIT_ON_INIT_FAILURE system property that really forces Tomcat as a whole to shut down. Thus "exit" is used in its name.) 3. The attribute has to be added to the JMX configuration file, java/org/apache/catalina/core/mbeans-descriptors.xml 4. The attribute has to be documented in the Configuration Reference, webapps/docs/config/context.xml 5. Looking for other similar listeners and callbacks. E.g. ServletContainerInitializers for (Map.Entry<ServletContainerInitializer, Set<Class<?>>> entry : initializers.entrySet()) { try { entry.getKey().onStartup(entry.getValue(), getServletContext()); } catch (ServletException e) { log.error(sm.getString("standardContext.sciFail"), e); ok = false; break; } } Looking at implementations of org.apache.catalina.LifecycleListener - they are OK. (Those listeners are called notified via "org.apache.catalina.util.LifecycleBase.fireLifecycleEvent()". That method does not catch exceptions and thus fails early.) Best regards, Konstantin Kolinko --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org