Details

    • Type: Task Task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: JCR Base 2.0.4
    • Fix Version/s: JCR Base 2.0.6
    • Component/s: JCR
    • Labels:
      None

      Description

      The Session Pool Support code in the jcr/base bundle has a few issues:

      • Only works with SimpleCredentials authentication
      • Wrong level of abstraction: such optimizations are the task of the repository implementation and not of the user
      • Cleanup of the session for reuse is brittle and timeconsuming (due to a JCR search to ensure unlocking transient locks)
      • Little to no gain in performance (in fact performance is even lower than using plain Jackrabbit Sessions.

      In addition, I suspect session pooling to be responsible for various strange integration test failures (see also SLING-1272).

      Therefore Session Pool support should be removed.

      See also the dev list discussion at http://markmail.org/thread/wiiqs2ym75mpfxcd

      1. SLING-1283.patch
        72 kB
        Felix Meschberger

        Issue Links

          Activity

          Hide
          Felix Meschberger added a comment -

          Removed Session Pool support from the jcr/base bundle in Rev. 905243.

          Show
          Felix Meschberger added a comment - Removed Session Pool support from the jcr/base bundle in Rev. 905243.
          Hide
          Thomas Mueller added a comment -

          I forgot to say, the memory leak also occurs if the session pool is 'disabled'
          (Pool max active = -1; Pool max idle = 0)

          Show
          Thomas Mueller added a comment - I forgot to say, the memory leak also occurs if the session pool is 'disabled' (Pool max active = -1; Pool max idle = 0)
          Hide
          Thomas Mueller added a comment -

          Another reason why the session pool is problematic:

          There is a memory leak. The session pool prevents unclosed sessions from being garbage collected.

          The application may run out of memory if the user forgets to close sessions.
          The session pool keeps a hard reference to each open session (in an IdentityHashMap).

          P.S. A similar leak existed in Jackrabbit Core, but is now fixed: JCR-1216

          Show
          Thomas Mueller added a comment - Another reason why the session pool is problematic: There is a memory leak. The session pool prevents unclosed sessions from being garbage collected. The application may run out of memory if the user forgets to close sessions. The session pool keeps a hard reference to each open session (in an IdentityHashMap). P.S. A similar leak existed in Jackrabbit Core, but is now fixed: JCR-1216
          Hide
          Felix Meschberger added a comment -

          Proposed patch for removing session pool support

          Show
          Felix Meschberger added a comment - Proposed patch for removing session pool support

            People

            • Assignee:
              Felix Meschberger
              Reporter:
              Felix Meschberger
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development