Uploaded image for project: 'Apache DirectMemory'
  1. Apache DirectMemory
  2. DIRECTMEMORY-84

Cache should not be a private DirectMemoryServlet field and initialized in init methods

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • 0.1-incubating
    • None
    • REST Server

    Description

      The cache should not be a private DirectMemoryServlet field as there is nothing per the Servlet spec that prevents the Servlet container to hold several instances of the same servlet class. This may lead to memory consumption (as the cache may be created several times) and unexpected behaviour (as one instance may put the object in ITS cache and another one try to retrieve it and either no finding it or returning another object !!!!).
      It should be a Servlet context attribute and managed through the ServletContextListener pattern.
      As soon as I have completed the work i'm doing on the Closeable stuff, I'm will submit the fix

      Attachments

        Activity

          People

            olamy Olivier Lamy
            jeffmaury Jeff Maury
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: