diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/auth/identifier/UserToIndIdentifierFactorySetup.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/auth/identifier/UserToIndIdentifierFactorySetup.java index 9c081b887..067fb5200 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/auth/identifier/UserToIndIdentifierFactorySetup.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/auth/identifier/UserToIndIdentifierFactorySetup.java @@ -9,6 +9,8 @@ import javax.servlet.ServletContextListener; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import edu.cornell.mannlib.vitro.webapp.servlet.setup.AbortStartup; + /** * Setups context so that Identifiers for Individuals associated with Users are * added to requests. @@ -22,6 +24,11 @@ public class UserToIndIdentifierFactorySetup implements ServletContextListener{ private static final Log log = LogFactory.getLog(UserToIndIdentifierFactorySetup.class.getName()); public void contextInitialized(ServletContextEvent sce) { + + if (AbortStartup.isStartupAborted(sce.getServletContext())) { + return; + } + ServletContext sc = sce.getServletContext(); ServletIdentifierBundleFactory .addIdentifierBundleFactory(sc, new UserToIndIdentifierFactory()); diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/FreemarkerSetup.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/FreemarkerSetup.java index b178aebf1..be2c4008e 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/FreemarkerSetup.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/FreemarkerSetup.java @@ -11,6 +11,7 @@ import javax.servlet.ServletContextListener; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import edu.cornell.mannlib.vitro.webapp.servlet.setup.AbortStartup; import edu.cornell.mannlib.vitro.webapp.web.templatemodels.BaseTemplateModel; import freemarker.template.Configuration; @@ -20,6 +21,10 @@ public class FreemarkerSetup implements ServletContextListener { public void contextInitialized(ServletContextEvent event) { + if (AbortStartup.isStartupAborted(event.getServletContext())) { + return; + } + ServletContext sc = event.getServletContext(); sc.setAttribute("themeToConfigMap", new HashMap()); BaseTemplateModel.setServletContext(sc); diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/search/lucene/LuceneSetup.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/search/lucene/LuceneSetup.java index 9c72794b0..f75b941a2 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/search/lucene/LuceneSetup.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/search/lucene/LuceneSetup.java @@ -36,6 +36,7 @@ import edu.cornell.mannlib.vitro.webapp.dao.jena.SearchReindexingListener; import edu.cornell.mannlib.vitro.webapp.search.beans.ObjectSourceIface; import edu.cornell.mannlib.vitro.webapp.search.beans.ProhibitedFromSearch; import edu.cornell.mannlib.vitro.webapp.search.indexing.IndexBuilder; +import edu.cornell.mannlib.vitro.webapp.servlet.setup.AbortStartup; import edu.cornell.mannlib.vitro.webapp.dao.DisplayVocabulary; /** @@ -68,6 +69,11 @@ public class LuceneSetup implements javax.servlet.ServletContextListener { * created. */ public void contextInitialized(ServletContextEvent sce) { + + if (AbortStartup.isStartupAborted(sce.getServletContext())) { + return; + } + try { ServletContext context = sce.getServletContext(); 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 new file mode 100644 index 000000000..88d76e567 --- /dev/null +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/AbortStartup.java @@ -0,0 +1,25 @@ +/* $This file is distributed under the terms of the license in /doc/license.txt$ */ + +package edu.cornell.mannlib.vitro.webapp.servlet.setup; + +import javax.servlet.ServletContext; + +public class AbortStartup { + + private static final String ATTRIBUTE_NAME = AbortStartup.class.getName(); + + /** + * Sets a context attribute to prevent other context listeners from running. + */ + public static void abortStartup(ServletContext context) { + context.setAttribute(ATTRIBUTE_NAME, new Boolean(true)); + } + + /** + * Checks whether a previous context listener has caused startup to be aborted. + */ + public static boolean isStartupAborted(ServletContext context) { + return (context.getAttribute(ATTRIBUTE_NAME) != null); + } + +} diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/AssembleModelsSetup.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/AssembleModelsSetup.java index e1d22da1d..237f55311 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/AssembleModelsSetup.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/AssembleModelsSetup.java @@ -42,6 +42,11 @@ public class AssembleModelsSetup implements ServletContextListener { private String SYNTAX = "N3"; public void contextInitialized(ServletContextEvent sce) { + + if (AbortStartup.isStartupAborted(sce.getServletContext())) { + return; + } + OntModel jenaOntModel = null; try { jenaOntModel = (OntModel) sce.getServletContext().getAttribute("baseOntModel"); diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/AttachSubmodels.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/AttachSubmodels.java index 0c6ecf375..eb88d26b6 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/AttachSubmodels.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/AttachSubmodels.java @@ -28,6 +28,11 @@ public class AttachSubmodels implements ServletContextListener { private static final Log log = LogFactory.getLog( AttachSubmodels.class ); public void contextInitialized( ServletContextEvent sce ) { + + if (AbortStartup.isStartupAborted(sce.getServletContext())) { + return; + } + try { //FIXME refactor this diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/DefaultThemeSetup.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/DefaultThemeSetup.java index e90bae45c..f43f1a397 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/DefaultThemeSetup.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/DefaultThemeSetup.java @@ -16,6 +16,10 @@ public class DefaultThemeSetup implements ServletContextListener { // Set default theme based on themes present on the file system public void contextInitialized(ServletContextEvent event) { + if (AbortStartup.isStartupAborted(event.getServletContext())) { + return; + } + // Find the themes directory in the file system ServletContext sc = event.getServletContext(); boolean doSort = true; diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/FileGraphSetup.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/FileGraphSetup.java index ed49b5a2f..3b8265338 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/FileGraphSetup.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/FileGraphSetup.java @@ -41,6 +41,10 @@ public class FileGraphSetup implements ServletContextListener { public void contextInitialized(ServletContextEvent sce) { + if (AbortStartup.isStartupAborted(sce.getServletContext())) { + return; + } + try { OntModelSelectorImpl baseOms = (OntModelSelectorImpl) sce.getServletContext().getAttribute("baseOntModelSelector"); Store kbStore = (Store) sce.getServletContext().getAttribute("kbStore"); diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/HeapDefragement.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/HeapDefragement.java index c17b513b0..50ea33181 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/HeapDefragement.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/HeapDefragement.java @@ -25,6 +25,11 @@ public class HeapDefragement implements ServletContextListener { @Override public void contextInitialized(ServletContextEvent arg0) { + + if (AbortStartup.isStartupAborted(arg0.getServletContext())) { + return; + } + try{ log.info("Calling System.gc() to defragement the heap."); long start = System.currentTimeMillis(); diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/JenaDataSourceSetup.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/JenaDataSourceSetup.java index 372b84d41..1112b5e24 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/JenaDataSourceSetup.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/JenaDataSourceSetup.java @@ -44,6 +44,11 @@ public class JenaDataSourceSetup extends JenaDataSourceSetupBase implements java private static final Log log = LogFactory.getLog(JenaDataSourceSetup.class.getName()); public void contextInitialized(ServletContextEvent sce) { + + if (AbortStartup.isStartupAborted(sce.getServletContext())) { + return; + } + try { String tripleStoreTypeStr = diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/JenaDataSourceSetupSDB.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/JenaDataSourceSetupSDB.java index 127d4cd14..64553e0af 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/JenaDataSourceSetupSDB.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/JenaDataSourceSetupSDB.java @@ -60,6 +60,11 @@ public class JenaDataSourceSetupSDB extends JenaDataSourceSetupBase implements j private static final Log log = LogFactory.getLog(JenaDataSourceSetupSDB.class); public void contextInitialized(ServletContextEvent sce) { + + if (AbortStartup.isStartupAborted(sce.getServletContext())) { + return; + } + try { // JenaPersistentDataSourceSetup should have already set this up - it just sets diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/JenaPersistentDataSourceSetup.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/JenaPersistentDataSourceSetup.java index 59a2167ab..86f3074ea 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/JenaPersistentDataSourceSetup.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/JenaPersistentDataSourceSetup.java @@ -28,6 +28,10 @@ public class JenaPersistentDataSourceSetup extends JenaDataSourceSetupBase public void contextInitialized(ServletContextEvent sce) { + if (AbortStartup.isStartupAborted(sce.getServletContext())) { + return; + } + Model dbModel; OntModel memModel = ModelFactory.createOntologyModel( this.DB_ONT_MODEL_SPEC); diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/NamespacePrefixMapSetup.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/NamespacePrefixMapSetup.java index 54dab91c1..4dd388495 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/NamespacePrefixMapSetup.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/NamespacePrefixMapSetup.java @@ -13,6 +13,11 @@ import com.hp.hpl.jena.rdf.model.Model; public class NamespacePrefixMapSetup implements ServletContextListener { public void contextInitialized(ServletContextEvent sce) { + + if (AbortStartup.isStartupAborted(sce.getServletContext())) { + return; + } + HashMap prefixToNamespace = new HashMap(); HashMap namespaceToPrefix = new HashMap(); Model model = (Model) sce.getServletContext().getAttribute("jenaOntModel"); diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/NightlyDefragement.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/NightlyDefragement.java index f23a6711b..3fb81b808 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/NightlyDefragement.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/NightlyDefragement.java @@ -61,6 +61,11 @@ public class NightlyDefragement implements ServletContextListener, Runnable { @Override public void contextInitialized(ServletContextEvent arg0) { + + if (AbortStartup.isStartupAborted(arg0.getServletContext())) { + return; + } + lastRun = new DateTime().minusHours( 400 ); if( nightlyDefragement != null ){ log.warn("NightlyDefragement listener has already been setup. Check your web.xml for duplicate listeners."); diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/PelletReasonerSetup.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/PelletReasonerSetup.java index 1255e6707..b37d7a6b4 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/PelletReasonerSetup.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/PelletReasonerSetup.java @@ -26,6 +26,10 @@ public class PelletReasonerSetup implements ServletContextListener { public void contextInitialized(ServletContextEvent sce) { + if (AbortStartup.isStartupAborted(sce.getServletContext())) { + return; + } + try { //FIXME refactor this diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/PelletReasonerSetupComplete.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/PelletReasonerSetupComplete.java index 2308da769..b096a49d8 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/PelletReasonerSetupComplete.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/PelletReasonerSetupComplete.java @@ -21,36 +21,40 @@ public class PelletReasonerSetupComplete implements ServletContextListener { public void contextInitialized(ServletContextEvent sce) { + if (AbortStartup.isStartupAborted(sce.getServletContext())) { + return; + } + try { - OntModel memoryModel = (OntModel) sce.getServletContext().getAttribute("jenaOntModel"); - OntModel baseModel = (OntModel) sce.getServletContext().getAttribute("baseOntModel"); - OntModel inferenceModel = (OntModel) sce.getServletContext().getAttribute("inferenceOntModel"); - - if (!baseModel.getProfile().NAMESPACE().equals(OWL.NAMESPACE.getNameSpace())) { - log.error("Not connecting Pellet reasoner - base model is not an OWL model"); - return; - } - - // Set various options - PelletOptions.DL_SAFE_RULES = true; - PelletOptions.USE_COMPLETION_QUEUE = true; - PelletOptions.USE_TRACING = true; - PelletOptions.TRACK_BRANCH_EFFECTS = true; - PelletOptions.USE_INCREMENTAL_CONSISTENCY = true; - PelletOptions.USE_INCREMENTAL_DELETION = true; - - // Pellet 2.0-RC5 is buggy with incremental reasoning through Jena - //PelletOptions.USE_INCREMENTAL_CONSISTENCY = true; - //PelletOptions.USE_INCREMENTAL_DELETION = true; - ReasonerConfiguration config = ReasonerConfiguration.COMPLETE; - config.setIncrementalReasongingEnabled(false); - - PelletListener pelletListener = new PelletListener(memoryModel,baseModel,inferenceModel,config); - sce.getServletContext().setAttribute("pelletListener",pelletListener); - sce.getServletContext().setAttribute("pelletOntModel", pelletListener.getPelletModel()); - - log.debug("Reasoner connected"); + OntModel memoryModel = (OntModel) sce.getServletContext().getAttribute("jenaOntModel"); + OntModel baseModel = (OntModel) sce.getServletContext().getAttribute("baseOntModel"); + OntModel inferenceModel = (OntModel) sce.getServletContext().getAttribute("inferenceOntModel"); + + if (!baseModel.getProfile().NAMESPACE().equals(OWL.NAMESPACE.getNameSpace())) { + log.error("Not connecting Pellet reasoner - base model is not an OWL model"); + return; + } + + // Set various options + PelletOptions.DL_SAFE_RULES = true; + PelletOptions.USE_COMPLETION_QUEUE = true; + PelletOptions.USE_TRACING = true; + PelletOptions.TRACK_BRANCH_EFFECTS = true; + PelletOptions.USE_INCREMENTAL_CONSISTENCY = true; + PelletOptions.USE_INCREMENTAL_DELETION = true; + + // Pellet 2.0-RC5 is buggy with incremental reasoning through Jena + //PelletOptions.USE_INCREMENTAL_CONSISTENCY = true; + //PelletOptions.USE_INCREMENTAL_DELETION = true; + ReasonerConfiguration config = ReasonerConfiguration.COMPLETE; + config.setIncrementalReasongingEnabled(false); + + PelletListener pelletListener = new PelletListener(memoryModel,baseModel,inferenceModel,config); + sce.getServletContext().setAttribute("pelletListener",pelletListener); + sce.getServletContext().setAttribute("pelletOntModel", pelletListener.getPelletModel()); + + log.debug("Reasoner connected"); } catch (Throwable t) { t.printStackTrace(); diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/PelletReasonerSetupPseudocomplete.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/PelletReasonerSetupPseudocomplete.java index ce20790a5..15438580c 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/PelletReasonerSetupPseudocomplete.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/PelletReasonerSetupPseudocomplete.java @@ -21,37 +21,41 @@ public class PelletReasonerSetupPseudocomplete implements ServletContextListener public void contextInitialized(ServletContextEvent sce) { + if (AbortStartup.isStartupAborted(sce.getServletContext())) { + return; + } + try { - OntModel memoryModel = (OntModel) sce.getServletContext().getAttribute("jenaOntModel"); - OntModel baseModel = (OntModel) sce.getServletContext().getAttribute("baseOntModel"); - OntModel inferenceModel = (OntModel) sce.getServletContext().getAttribute("inferenceOntModel"); - - if (!baseModel.getProfile().NAMESPACE().equals(OWL.NAMESPACE.getNameSpace())) { - log.error("Not connecting Pellet reasoner - base model is not an OWL model"); - return; - } - - // Set various options - PelletOptions.DL_SAFE_RULES = true; - PelletOptions.USE_COMPLETION_QUEUE = true; - PelletOptions.USE_TRACING = true; - PelletOptions.TRACK_BRANCH_EFFECTS = true; - PelletOptions.USE_INCREMENTAL_CONSISTENCY = true; - PelletOptions.USE_INCREMENTAL_DELETION = true; - - // Pellet 2.0-RC5 is buggy with incremental reasoning through Jena - //PelletOptions.USE_INCREMENTAL_CONSISTENCY = true; - //PelletOptions.USE_INCREMENTAL_DELETION = true; - ReasonerConfiguration config = ReasonerConfiguration.PSEUDOCOMPLETE; - config.setIncrementalReasongingEnabled(false); - - PelletListener pelletListener = new PelletListener(memoryModel,baseModel,inferenceModel,config); - sce.getServletContext().setAttribute("pelletListener",pelletListener); - sce.getServletContext().setAttribute("pelletOntModel", pelletListener.getPelletModel()); - - log.debug("Reasoner connected"); - + OntModel memoryModel = (OntModel) sce.getServletContext().getAttribute("jenaOntModel"); + OntModel baseModel = (OntModel) sce.getServletContext().getAttribute("baseOntModel"); + OntModel inferenceModel = (OntModel) sce.getServletContext().getAttribute("inferenceOntModel"); + + if (!baseModel.getProfile().NAMESPACE().equals(OWL.NAMESPACE.getNameSpace())) { + log.error("Not connecting Pellet reasoner - base model is not an OWL model"); + return; + } + + // Set various options + PelletOptions.DL_SAFE_RULES = true; + PelletOptions.USE_COMPLETION_QUEUE = true; + PelletOptions.USE_TRACING = true; + PelletOptions.TRACK_BRANCH_EFFECTS = true; + PelletOptions.USE_INCREMENTAL_CONSISTENCY = true; + PelletOptions.USE_INCREMENTAL_DELETION = true; + + // Pellet 2.0-RC5 is buggy with incremental reasoning through Jena + //PelletOptions.USE_INCREMENTAL_CONSISTENCY = true; + //PelletOptions.USE_INCREMENTAL_DELETION = true; + ReasonerConfiguration config = ReasonerConfiguration.PSEUDOCOMPLETE; + config.setIncrementalReasongingEnabled(false); + + PelletListener pelletListener = new PelletListener(memoryModel,baseModel,inferenceModel,config); + sce.getServletContext().setAttribute("pelletListener",pelletListener); + sce.getServletContext().setAttribute("pelletOntModel", pelletListener.getPelletModel()); + + log.debug("Reasoner connected"); + } catch (Throwable t) { t.printStackTrace(); } diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/PelletReasonerSetupPseudocompleteIgnoreDataproperties.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/PelletReasonerSetupPseudocompleteIgnoreDataproperties.java index d7d363291..8cfee3294 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/PelletReasonerSetupPseudocompleteIgnoreDataproperties.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/PelletReasonerSetupPseudocompleteIgnoreDataproperties.java @@ -22,6 +22,10 @@ public class PelletReasonerSetupPseudocompleteIgnoreDataproperties implements public void contextInitialized(ServletContextEvent sce) { + if (AbortStartup.isStartupAborted(sce.getServletContext())) { + return; + } + try { OntModel memoryModel = (OntModel) sce.getServletContext().getAttribute("jenaOntModel"); diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/RunSparqlConstructs.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/RunSparqlConstructs.java index 7a0bdb4e0..db416e963 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/RunSparqlConstructs.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/RunSparqlConstructs.java @@ -42,6 +42,10 @@ public class RunSparqlConstructs implements ServletContextListener { public void contextInitialized(ServletContextEvent sce) { + if (AbortStartup.isStartupAborted(sce.getServletContext())) { + return; + } + try { WebappDaoFactory wadf = (WebappDaoFactory) sce.getServletContext().getAttribute("webappDaoFactory"); diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/SimpleReasonerSetup.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/SimpleReasonerSetup.java index c6bfa48f4..62ee5f160 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/SimpleReasonerSetup.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/SimpleReasonerSetup.java @@ -47,6 +47,10 @@ public class SimpleReasonerSetup implements ServletContextListener { public void contextInitialized(ServletContextEvent sce) { + if (AbortStartup.isStartupAborted(sce.getServletContext())) { + return; + } + try { // set up Pellet reasoning for the TBox diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/UpdateKnowledgeBase.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/UpdateKnowledgeBase.java index ec8e7e9c7..b95408454 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/UpdateKnowledgeBase.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/UpdateKnowledgeBase.java @@ -65,6 +65,10 @@ public class UpdateKnowledgeBase implements ServletContextListener { public void contextInitialized(ServletContextEvent sce) { + if (AbortStartup.isStartupAborted(sce.getServletContext())) { + return; + } + try { ServletContext ctx = sce.getServletContext(); diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/UpdateUploadedFiles.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/UpdateUploadedFiles.java index df9db2bd2..0237772c8 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/UpdateUploadedFiles.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/servlet/setup/UpdateUploadedFiles.java @@ -48,6 +48,11 @@ public class UpdateUploadedFiles implements ServletContextListener { */ @Override public void contextInitialized(ServletContextEvent sce) { + + if (AbortStartup.isStartupAborted(sce.getServletContext())) { + return; + } + try { ServletContext ctx = sce.getServletContext();