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

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

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Top
    • Resolution: Fixed
    • 3.2.0, 3.2.1
    • 4.1.0
    • None
    • Platform Sprint 140

    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

              Unassigned Unassigned
              rgerritsen Rutger Gerritsen (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: