You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Felix Meschberger (JIRA)" <ji...@apache.org> on 2010/06/22 10:35:55 UTC

[jira] Commented: (SLING-1566) Add ResourceResolver.isLive() method

    [ https://issues.apache.org/jira/browse/SLING-1566?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12881129#action_12881129 ] 

Felix Meschberger commented on SLING-1566:
------------------------------------------

Added isLive method to ResourceResolver interface and implementations in the JCR Resource bundle in Rev. 956813.

Also documented the IllegalStateException being thrown on methods if ResourceResolver is closed and added a close-check to the JcrResourceResolver.getUserID() method.

> Add ResourceResolver.isLive() method
> ------------------------------------
>
>                 Key: SLING-1566
>                 URL: https://issues.apache.org/jira/browse/SLING-1566
>             Project: Sling
>          Issue Type: Improvement
>          Components: API, JCR
>    Affects Versions: JCR Prefs 1.0.0
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>             Fix For: JCR Resource 2.0.8, API 2.1.0
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.