Changeset 33175 for main

Show
Ignore:
Timestamp:
21.06.2019 14:24:04 (4 months ago)
Author:
kjdon
Message:

the servlet context is one per tomcat install, not one per servlet. ie shared across servlets. So can't set library name there as it gets overwritten when next servlet is initialized. Because we want to get MR from the context, we store as librarynameRouter, one per servlet.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/LibraryServlet.java

    r33090 r33175  
    303303 
    304304        //Allow the message router and the document to be accessed from anywhere in this servlet context 
    305         this.getServletContext().setAttribute("GSRouter", this.recept.getMessageRouter()); 
    306         this.getServletContext().setAttribute("LibraryName", library_name); 
     305        this.getServletContext().setAttribute(library_name+"Router", this.recept.getMessageRouter()); 
     306        //this.getServletContext().setAttribute("LibraryName", library_name); 
    307307    } 
    308308 
     
    551551            should_cache = false; 
    552552 
     553            logger.error("KATH: cleaning up the cache"); 
    553554            // we may want to remove all collection cache info, or just a specific collection 
    554555            boolean clean_all = true;