From a6f579bd5dafcd058312ef94b6ac3bfbd46d57ca Mon Sep 17 00:00:00 2001 From: jeb228 Date: Fri, 25 Feb 2011 15:29:24 +0000 Subject: [PATCH] Add a comment for the slow learners like me. --- .../vitro/webapp/servlet/setup/AbortStartup.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/AbortStartup.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/AbortStartup.java index 88d76e567..c06685c2d 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/AbortStartup.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/AbortStartup.java @@ -4,6 +4,18 @@ package edu.cornell.mannlib.vitro.webapp.servlet.setup; import javax.servlet.ServletContext; +/** + * Provide a mechanism so a ServletContextListener can set a flag that tells + * other ServletContextListeners not to run. + * + * The listener that detects a problem should still throw an exception, so + * Tomcat will declare that the startup has failed and mark the application as + * not runnable. However, Tomcat will still run the other listeners before + * giving up. Hence, the need for this flag. + * + * If the other listeners are looking for this flag, they can (and should) + * decide to simply exit rather than attempting to initialize. + */ public class AbortStartup { private static final String ATTRIBUTE_NAME = AbortStartup.class.getName();