You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Carsten Ziegeler (JIRA)" <ji...@apache.org> on 2009/10/07 11:12:31 UTC

[jira] Commented: (SLING-1129) Patch to make it easier to extend JcrResourceResolver2 and its factory.

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

Carsten Ziegeler commented on SLING-1129:
-----------------------------------------

The code for the bind/unbind methods is not correct as bind with the new repository might be called before unbind (with the old repository)
Therefore you have to check in unbind if the parameter is the same as the instance variable and only in this case set the instance variable to null
(The scr plugin generates this for you)

> Patch to make it easier to extend JcrResourceResolver2 and its factory.
> -----------------------------------------------------------------------
>
>                 Key: SLING-1129
>                 URL: https://issues.apache.org/jira/browse/SLING-1129
>             Project: Sling
>          Issue Type: Improvement
>          Components: JCR
>    Affects Versions: JCR Resource 2.0.4
>            Reporter: Ian Boston
>             Fix For: JCR Resource 2.0.8
>
>         Attachments: SLING-1129.diff
>
>
> At the moment, its hard if not impossible to extend the functionallity of the JcrResourceResolver2 and its Factory without succumbing to the dangerous practice of duplicating and patching implementation code.
> The patch to follow add some small extension points that makes it possible to extend the Factory as a component, and the JcrResourceResolver2 itself. It make no changes to functionality or API.

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