Uploaded image for project: '[Read Only] - Hippo Site Toolkit 2'
  1. [Read Only] - Hippo Site Toolkit 2
  2. HSTTWO-2271

SiteMapItemHandler using HstRequestContext#getSession() could lead to jcr session leak.

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • 2.24.07, 2.25.05
    • None

    Description

      In summary:
      HstRequest.getSession() calls in a SiteMapItemHandler implementation may lead to JCR sessions leak (not returning used sessions to the session pool automatically).

      So, the solution for now is that each SiteMapItemHandler using HstRequestContext.getSession() must return the used JCR session manually by itself.

      I think this will fix the problem for now.

      But we will probably consider improving this more naturally in the future.
      I don't have any concrete ideas, but I remember Ard has once mentioned you can introduce a separate valve-pipeline to which most logic of HstFilter should be moved.
      In that case, maybe the sitemapitemhandler processing logic can be inside a valve. Then the used session in sitemapitemhandlers can be cleaned up in the cleanupvalve, too.

      Attachments

        Issue Links

          Activity

            People

              svoortman Simon Voortman (Inactive)
              wko Woonsan Ko (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: