Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-1566

Add ResourceResolver.isLive() method

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • JCR Prefs 1.0.0
    • JCR Resource 2.0.8, API 2.1.0
    • API, JCR
    • None

    Description

      SLING-1262 added a close() method to the ResourceResolver declaring that an exception will be thrown if the ResourceResolver is used after it has been closed.

      To be able to check a ResourceResolver in application code, an isLive method should be added.

      In addition, the actual exception – IllegalStateException – being thrown if the ResourceResolver has been closed should also be documented.

      Finally, in the JcrResourceReslver, the live-check is mainly implemented in the checkClosed() method. Probably this method should not only check the close state of itself but also, whether the underlying primary session is still alive. If the ResourceResolver has not been closed yet, but the session has already been logged out, the JcrResourceResolver may choose to close itself too (as a side effect). This is to be discussed.

      Attachments

        Activity

          People

            fmeschbe Felix Meschberger
            fmeschbe Felix Meschberger
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: