jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chetan Mehrotra (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OAK-3201) Use static references in SecurityProviderImpl for composite services
Date Tue, 15 Sep 2015 08:01:46 GMT

    [ https://issues.apache.org/jira/browse/OAK-3201?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14745023#comment-14745023
] 

Chetan Mehrotra commented on OAK-3201:
--------------------------------------

Missed reviewing it due to other issues. Some quick comments 
* {{SecurityProviderRegistration}} has a pretty big synchronized block. Holding synchronized
block while making the registration can lead to deadlocks like the one we saw in OAK-2401
* Having synchornized for all getServices might pose problem - Securityprovider is invoked
on critical path in concurrent manner. So we should avoid having any synchronized blocks in
getServices call. Note that default implementation of Whitboard makes quite an effort to avoid
synchronized blocks in getServices call.
* No default value for {{requiredServicePids}}. For e.g. we already have {{RestrictionProviderImpl}}
registered as a service so it should be part of default pids otherwise current issue still
remains i.e. if {{RestrictionProviderImpl}} comes later then it would not picked up


> Use static references in SecurityProviderImpl for composite services
> --------------------------------------------------------------------
>
>                 Key: OAK-3201
>                 URL: https://issues.apache.org/jira/browse/OAK-3201
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: core
>            Reporter: Francesco Mari
>            Assignee: Francesco Mari
>             Fix For: 1.3.7
>
>         Attachments: OAK-3201-01.patch, OAK-3201-02.patch, OAK-3201-03.patch, OAK-3201-04.patch,
OAK-3201-05.patch, OAK-3201-06.patch, mbean-test.log
>
>
> {{SecurityProviderImpl}} has dynamic references to many other services, like {{RestrictionProvider}},
that represent the configuration of this component.
> Being these services dynamic, the OSGi runtime has no clear dependency relationship between
the {{SecurityProviderImpl}} and the required services. Thus, it may happen that an instance
of {{SecurityProviderImpl}} is published before the services it requires are started, creating
a window where the {{SecurityProviderimpl}} is operating differently from the way it's configured.
> I suggest to turn the dynamic references in {{SecurityProviderImpl}} to static ones to
improve the consistency of the implementation.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message