Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
JCR Prefs 1.0.0
-
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.