[
https://issues.apache.org/jira/browse/SLING-3427?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13918023#comment-13918023
]
Stefan Scheidewig commented on SLING-3427:
------------------------------------------
So, maybe it's better to pass the service properties to the bind methods (see
patch number two). Using the type parameter instead of the ServiceReference has
the charm that SCR gets and ungets the service.
> Incorrect handling of NamespaceMapper bindings within
> SlingServerRepositoryManager
> ----------------------------------------------------------------------------------
>
> Key: SLING-3427
> URL: https://issues.apache.org/jira/browse/SLING-3427
> Project: Sling
> Issue Type: Bug
> Components: JCR
> Affects Versions: JCR Jackrabbit Server 2.1.2
> Reporter: Stefan Scheidewig
> Assignee: Carsten Ziegeler
> Priority: Minor
> Labels: jackrabbit, namespace
> Fix For: JCR Jackrabbit Server 2.1.2
>
> Attachments: namespacemapper_binding_fix.patch,
> namespacemapper_binding_fix_with_service_pid.patch
>
>
> The bind method for the namespace service references within class
> org.apache.sling.jcr.jackrabbit.server.impl.SlingServerRepositoryManager is
> accessing the ComponentContext set by the activate method but unfortunately
> that is incorrect because the Declarative Services Specification Version 1.1
> - section 112.5.6 states that the binding happens before the activation. So
> the attempt to bind the TestNamespaceMapper Service to the
> SlingServerRepositoryManager always results in a NullPointerException.
--
This message was sent by Atlassian JIRA
(v6.2#6252)