Uploaded image for project: 'Hippo Site Toolkit 2'
  1. Hippo Site Toolkit 2
  2. HSTTWO-3795

HstLinkProcessor using HstRequestContext#getSession() leads to jcr session leak

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Top
    • Resolution: Fixed
    • Affects Version/s: 3.2.0, 3.2.1
    • Fix Version/s: 4.1.0
    • Component/s: None
    • Labels:
    • Similar issues:
    • Sprint:
      Platform Sprint 140
    • Processed by team:
      Platform

      Description

      Reproduce steps:

      1. Take the MyHippoProject
      2. Create a HstLinkProcessor and add this code:
            @Override
            protected HstLink doPreProcess(HstLink link) {
                try {
                    RequestContextProvider.get().getSession();
                } catch (RepositoryException e) {
                    e.printStackTrace();
                }
                return link;
            }
        
      3. Now, hit "http://localhost:8080/site/" more than 100 times.
        You'll see after 100 times you'll get javax.jcr.RepositoryException: org.hippoecm.hst.core.jcr.pool.NoAvailableSessionException: No session is available now. Probably the session pool was exhausted.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                rgerritsen Rutger Gerritsen
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: