NIHVIVO-336 Create a StartupManager to run all of the context listeners, and accumulate the results in a StartupStatus bean.
This commit is contained in:
parent
846a0f0d8b
commit
60f418f299
2 changed files with 68 additions and 157 deletions
66
productMods/WEB-INF/resources/startup_listeners.txt
Normal file
66
productMods/WEB-INF/resources/startup_listeners.txt
Normal file
|
@ -0,0 +1,66 @@
|
|||
#
|
||||
# ServletContextListeners for Vitro, to be instantiated and run by the StartupManager.
|
||||
#
|
||||
|
||||
edu.cornell.mannlib.vitro.webapp.config.ConfigurationPropertiesSetup
|
||||
|
||||
edu.cornell.mannlib.vitro.webapp.config.RevisionInfoSetup
|
||||
|
||||
edu.cornell.mannlib.vitro.webapp.email.FreemarkerEmailFactory$Setup
|
||||
|
||||
# DefaultThemeSetup needs to run before the JenaDataSourceSetup to allow creation of default portal and tab
|
||||
edu.cornell.mannlib.vitro.webapp.servlet.setup.DefaultThemeSetup
|
||||
|
||||
# Comment out this listener to run Vitro without a database
|
||||
# If used, this listener must be run before JenaDataSourceSetup
|
||||
edu.cornell.mannlib.vitro.webapp.servlet.setup.JenaPersistentDataSourceSetup
|
||||
|
||||
# This listener is required in order to use a Jena triple store (currently the only option)
|
||||
edu.cornell.mannlib.vitro.webapp.servlet.setup.JenaDataSourceSetup
|
||||
|
||||
edu.cornell.mannlib.vitro.webapp.filestorage.backend.FileStorageSetup
|
||||
|
||||
# Invokes a process to move any uploaded files into the new file storage system.
|
||||
# Needs to run after FileStorageSetup and JenaDataSourceSetup.
|
||||
# Should run before Pellet is set up.
|
||||
edu.cornell.mannlib.vitro.webapp.servlet.setup.UpdateUploadedFiles
|
||||
|
||||
# Update to the new UserAccounts model (1.3). Needs to run after JenaDataSourceSetup.
|
||||
edu.cornell.mannlib.vitro.webapp.servlet.setup.UpdateUserAccounts
|
||||
|
||||
# Invokes process to perform updates to align with ontology changes if needed -->
|
||||
# Needs to run before submodels are attached and Pellet is set up -->
|
||||
edu.cornell.mannlib.vitro.webapp.servlet.setup.UpdateKnowledgeBase
|
||||
|
||||
# The following listener remains temporarily until SDB becomes the default triple store
|
||||
edu.cornell.mannlib.vitro.webapp.servlet.setup.AttachSubmodels
|
||||
|
||||
# This listener sets up SimpleReasoner also in SDB mode. In SDB mode, Pellet is used for
|
||||
# TBox reasoning and SimpleReasoner is used for ABox reasoning. In RDF mode, Pellet was
|
||||
# used for both.
|
||||
edu.cornell.mannlib.vitro.webapp.servlet.setup.PelletReasonerSetup
|
||||
|
||||
edu.cornell.mannlib.vitro.webapp.auth.permissions.PermissionSetsLoader
|
||||
|
||||
edu.cornell.mannlib.vitro.webapp.auth.policy.bean.PropertyRestrictionPolicyHelper$Setup
|
||||
|
||||
# vivo specific, must appear before other policies
|
||||
edu.cornell.mannlib.vivo.auth.policy.VivoPolicy$Setup
|
||||
|
||||
edu.cornell.mannlib.vitro.webapp.auth.policy.setup.CommonPolicyFamilySetup
|
||||
|
||||
edu.cornell.mannlib.vitro.webapp.auth.policy.RootUserPolicy$Setup
|
||||
|
||||
edu.cornell.mannlib.vivo.auth.policy.SelfEditorRelationshipPolicy$Setup
|
||||
|
||||
edu.cornell.mannlib.vitro.webapp.auth.policy.RestrictHomeMenuItemEditingPolicy$Setup
|
||||
|
||||
# The Solr index uses a "public" filter, so the PropertyRestrictionPolicyHelper must already be set up.
|
||||
edu.cornell.mannlib.vitro.webapp.search.solr.SolrSetup
|
||||
|
||||
edu.cornell.mannlib.vitro.webapp.controller.freemarker.FreemarkerSetup
|
||||
|
||||
# On shutdown, this will kill the background thread started by Apache Commons File Upload
|
||||
org.apache.commons.fileupload.servlet.FileCleanerCleanup
|
||||
|
||||
edu.cornell.mannlib.vitro.webapp.dao.jena.VClassGroupCache$Setup
|
|
@ -41,166 +41,11 @@
|
|||
|
||||
<!-- Listeners ****************************************************** -->
|
||||
|
||||
<!-- Reads deploy.properties. Needs to run before almost all other listeners. -->
|
||||
<!-- StartupManager instantiates and runs the listeners from startup_listeners.txt -->
|
||||
<listener>
|
||||
<listener-class>edu.cornell.mannlib.vitro.webapp.config.ConfigurationPropertiesSetup</listener-class>
|
||||
</listener>
|
||||
|
||||
<listener>
|
||||
<listener-class>edu.cornell.mannlib.vitro.webapp.config.RevisionInfoSetup</listener-class>
|
||||
</listener>
|
||||
|
||||
<listener>
|
||||
<listener-class>edu.cornell.mannlib.vitro.webapp.email.FreemarkerEmailFactory$Setup</listener-class>
|
||||
</listener>
|
||||
|
||||
<!-- DefaultThemeSetup needs to run before the JenaDataSourceSetup
|
||||
to allow creation of default portal and tab -->
|
||||
<listener>
|
||||
<listener-class>edu.cornell.mannlib.vitro.webapp.servlet.setup.DefaultThemeSetup</listener-class>
|
||||
</listener>
|
||||
|
||||
<!-- experimental ModelMaker for ingest workflows - BJL 2008-06-01 -->
|
||||
|
||||
|
||||
<!-- Comment out this listener to run Vitro without a database -->
|
||||
<!-- If used, this listener must be run before JenaDataSourceSetup -->
|
||||
<listener>
|
||||
<listener-class>edu.cornell.mannlib.vitro.webapp.servlet.setup.JenaPersistentDataSourceSetup</listener-class>
|
||||
</listener>
|
||||
|
||||
<!-- experimental JenaMulgaraBridge, replaces JenaPersistentDataSourceSetup. -->
|
||||
<!-- <listener>
|
||||
-->
|
||||
<!-- <listener-class>
|
||||
-->
|
||||
<!-- edu.cornell.mannlib.vitro.webapp.servlet.setup.JenaMulgaraBridgeSetup
|
||||
-->
|
||||
<!-- </listener-class>
|
||||
-->
|
||||
<!-- </listener> -->
|
||||
|
||||
<!-- This listener is required in order to use a Jena triple store (currently the only option) -->
|
||||
<listener>
|
||||
<listener-class>edu.cornell.mannlib.vitro.webapp.servlet.setup.JenaDataSourceSetup</listener-class>
|
||||
<listener-class>edu.cornell.mannlib.vitro.webapp.startup.StartupManager</listener-class>
|
||||
</listener>
|
||||
|
||||
<listener>
|
||||
<listener-class>
|
||||
edu.cornell.mannlib.vitro.webapp.filestorage.backend.FileStorageSetup
|
||||
</listener-class>
|
||||
</listener>
|
||||
|
||||
<!-- Invokes a process to move any uploaded files into the new file storage system. -->
|
||||
<!-- Needs to run after FileStorageSetup and JenaDataSourceSetup. -->
|
||||
<!-- Should run before Pellet is set up. -->
|
||||
<listener>
|
||||
<listener-class>
|
||||
edu.cornell.mannlib.vitro.webapp.servlet.setup.UpdateUploadedFiles
|
||||
</listener-class>
|
||||
</listener>
|
||||
|
||||
<!-- Update to the new UserAccounts model (1.3). Needs to run after JenaDataSourceSetup. -->
|
||||
<listener>
|
||||
<listener-class>
|
||||
edu.cornell.mannlib.vitro.webapp.servlet.setup.UpdateUserAccounts
|
||||
</listener-class>
|
||||
</listener>
|
||||
|
||||
<!-- Invokes process to perform knowledge base updates to align with ontology changes if needed -->
|
||||
<listener>
|
||||
<listener-class>edu.cornell.mannlib.vitro.webapp.servlet.setup.UpdateKnowledgeBase</listener-class>
|
||||
</listener>
|
||||
|
||||
<!-- The following listener remains temporarily until SDB becomes the default triple store -->
|
||||
<listener>
|
||||
<listener-class>edu.cornell.mannlib.vitro.webapp.servlet.setup.AttachSubmodels</listener-class>
|
||||
</listener>
|
||||
|
||||
<!-- This listener sets up SimpleReasoner also in SDB mode. In SDB mode, Pellet is used for -->
|
||||
<!-- TBox reasoning and SimpleReasoner is used for ABox reasoning. In RDF mode, Pellet was -->
|
||||
<!-- used for both. -->
|
||||
<listener>
|
||||
<listener-class>edu.cornell.mannlib.vitro.webapp.servlet.setup.PelletReasonerSetup</listener-class>
|
||||
</listener>
|
||||
|
||||
<!-- The following listener records all edit changes, in reified form, to another database model -->
|
||||
<!-- still at an experimental stage -->
|
||||
<!-- if used, this listener should be run after all other Jena-related listeners, to avoid logging unnecessary data and slowing the context startup process -->
|
||||
|
||||
<!--
|
||||
<listener>
|
||||
<listener-class>
|
||||
edu.cornell.mannlib.vitro.webapp.servlet.setup.ModelAuditorSetup
|
||||
</listener-class>
|
||||
</listener>
|
||||
-->
|
||||
|
||||
<listener>
|
||||
<listener-class>edu.cornell.mannlib.vitro.webapp.auth.permissions.PermissionSetsLoader</listener-class>
|
||||
</listener>
|
||||
|
||||
<listener>
|
||||
<listener-class> edu.cornell.mannlib.vitro.webapp.auth.policy.bean.PropertyRestrictionPolicyHelper$Setup
|
||||
</listener-class>
|
||||
</listener>
|
||||
|
||||
<!-- vivo specific, must appear before other policies -->
|
||||
<listener>
|
||||
<listener-class> edu.cornell.mannlib.vivo.auth.policy.VivoPolicy$Setup</listener-class>
|
||||
</listener>
|
||||
|
||||
<listener>
|
||||
<listener-class> edu.cornell.mannlib.vitro.webapp.auth.policy.setup.CommonPolicyFamilySetup
|
||||
</listener-class>
|
||||
</listener>
|
||||
|
||||
<listener>
|
||||
<listener-class> edu.cornell.mannlib.vitro.webapp.auth.policy.RootUserPolicy$Setup</listener-class>
|
||||
</listener>
|
||||
|
||||
<listener>
|
||||
<listener-class> edu.cornell.mannlib.vivo.auth.policy.SelfEditorRelationshipPolicy$Setup</listener-class>
|
||||
</listener>
|
||||
|
||||
<listener>
|
||||
<listener-class> edu.cornell.mannlib.vitro.webapp.auth.policy.RestrictHomeMenuItemEditingPolicy$Setup</listener-class>
|
||||
</listener>
|
||||
|
||||
<!-- The Solr index uses a "public" filter, so the PropertyRestrictionPolicyHelper must already be set up. -->
|
||||
<listener>
|
||||
<listener-class>
|
||||
edu.cornell.mannlib.vitro.webapp.search.solr.SolrSetup
|
||||
</listener-class>
|
||||
</listener>
|
||||
|
||||
<listener>
|
||||
<listener-class>
|
||||
edu.cornell.mannlib.vitro.webapp.controller.freemarker.FreemarkerSetup
|
||||
</listener-class>
|
||||
</listener>
|
||||
|
||||
<!-- On shutdown, this will kill the background thread started by Apache Commons File Upload -->
|
||||
<listener>
|
||||
<listener-class>
|
||||
org.apache.commons.fileupload.servlet.FileCleanerCleanup
|
||||
</listener-class>
|
||||
</listener>
|
||||
|
||||
<listener>
|
||||
<listener-class>edu.cornell.mannlib.vitro.webapp.dao.jena.VClassGroupCache$Setup</listener-class>
|
||||
</listener>
|
||||
|
||||
<!--
|
||||
<listener>
|
||||
<listener-class>
|
||||
edu.cornell.mannlib.vitro.webapp.auth.policy.setup.AlwaysAuthorizePolicySetup
|
||||
</listener-class>
|
||||
</listener>
|
||||
-->
|
||||
|
||||
<!-- vivo specific -->
|
||||
|
||||
|
||||
<!-- Filters ********************************************************** -->
|
||||
<!-- in 2.4 spec, filter chain order is first by filter-mapping <url-pattern> order in web.xml,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue