Author: fhanik Date: Wed Mar 11 00:46:54 2009 New Revision: 752323 URL: http://svn.apache.org/viewvc?rev=752323&view=rev Log: Add a system property that lets the startup phase exit if the server encounters an exception during the initialization phase. The default is false, which means the behavior from today remains unchanged.
Modified: tomcat/trunk/java/org/apache/catalina/startup/Catalina.java tomcat/trunk/webapps/docs/config/systemprops.xml Modified: tomcat/trunk/java/org/apache/catalina/startup/Catalina.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/Catalina.java?rev=752323&r1=752322&r2=752323&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/startup/Catalina.java (original) +++ tomcat/trunk/java/org/apache/catalina/startup/Catalina.java Wed Mar 11 00:46:54 2009 @@ -533,7 +533,11 @@ try { server.initialize(); } catch (LifecycleException e) { - log.error("Catalina.start", e); + if (Boolean.getBoolean("org.apache.catalina.startup.EXIT_ON_INIT_FAILURE")) + throw new java.lang.Error(e); + else + log.error("Catalina.start", e); + } } Modified: tomcat/trunk/webapps/docs/config/systemprops.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/systemprops.xml?rev=752323&r1=752322&r2=752323&view=diff ============================================================================== --- tomcat/trunk/webapps/docs/config/systemprops.xml (original) +++ tomcat/trunk/webapps/docs/config/systemprops.xml Wed Mar 11 00:46:54 2009 @@ -360,6 +360,12 @@ <p>If <code>true</code>, use a shared selector for servlet write/read. If not specified, the default value of <code>true</code> will be used.</p> </property> + + <property name="org.apache.catalina.startup.EXIT_ON_INIT_FAILURE"> + <p>If <code>true</code>, the server will exit if an exception happens + during the server initialization phase. The default is <code>false</code>.</p> + </property> + </properties> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org