Class ContentModelSetup

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

    public class ContentModelSetup
    extends JenaDataSourceSetupBase
    implements javax.servlet.ServletContextListener
    Sets up the content models, OntModelSelectors and webapp DAO factories. Why the firstTimeStartup flag? Because you can't ask a large SDB model whether it is empty. SDB translates this into a call to size(), which in turn becomes find(null, null, null) and a count, and this gives an OutOfMemoryError because it tries to read the entire model into memory.
    • Constructor Detail

      • ContentModelSetup

        public ContentModelSetup()
    • Method Detail

      • contextInitialized

        public void contextInitialized​(javax.servlet.ServletContextEvent sce)
        Specified by:
        contextInitialized in interface javax.servlet.ServletContextListener
      • contextDestroyed

        public void contextDestroyed​(javax.servlet.ServletContextEvent sce)
        Specified by:
        contextDestroyed in interface javax.servlet.ServletContextListener