Class StartupManager

  • All Implemented Interfaces:
    EventListener, javax.servlet.ServletContextListener

    public class StartupManager
    extends Object
    implements javax.servlet.ServletContextListener
    Instantiate and run the ServletContextListeners for Vitro, while accumulating messages in StartupStatus. The startup listeners are stored in a file with one full-qualified class name per line. Blank lines and comment lines (starting with '#') are ignored. No exception in the listeners should prevent the successful completion. However, an uncaught exception or a fatal error status will cause the StartupStatusDisplayFilter to disply the problem instead of showing the home page (or any other requested page).
    • Constructor Detail

      • StartupManager

        public StartupManager()
    • Method Detail

      • contextInitialized

        public void contextInitialized​(javax.servlet.ServletContextEvent sce)
        Build a list of the listeners, and run contextInitialized() on each of them, at least until we get a fatal error. Each step of this should handle its own exceptions, but we'll wrap the whole thing in a try/catch just in case.
        Specified by:
        contextInitialized in interface javax.servlet.ServletContextListener
      • contextDestroyed

        public void contextDestroyed​(javax.servlet.ServletContextEvent sce)
        Notify the listeners that the context is being destroyed, in the reverse order from how they were notified at initialization.
        Specified by:
        contextDestroyed in interface javax.servlet.ServletContextListener