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

Julian Sedding commented on OAK-9841:
-------------------------------------

[~kwin] Agreed that such a generic plugin would be better located at Apache 
Felix.

It would need some thought. A very simple approach could be to mimic the naming 
scheme of Declarative Services and name the property e.g. 
{{.requiredObjectClasses}} and prefix it with the reference field's name. I.e. 
in this case it would be {{checkers.requiredObjectClasses}}. I don't think it 
can be avoided that the plugin is called for each modified configuration 
dictionary. It would need to iterate over all keys to check for the suffix 
{{.requiredObjectClasses}} and only add the other properties if such a property 
is found. Of course the {{.target}} filter allows for very flexible checks, so 
a plugin could either try to be clever and somehow capture a more complete 
subset of its functionality. Or it targets only the most common use case, which 
I think is what we are trying to achieve here.

The next challenge might be to get the services injected in the correct order 
;) It's not always relevant, but it should never hurt. I have no idea if that's 
possible without custom code inside the component.

> Race condition in NodeStoreChecksService
> ----------------------------------------
>
>                 Key: OAK-9841
>                 URL: https://issues.apache.org/jira/browse/OAK-9841
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: composite
>            Reporter: Konrad Windszus
>            Priority: Major
>
> The {{NodeStoreChecksService}} 
> (https://github.com/apache/jackrabbit-oak/blob/bbc141fd1fb9ff0d9ce742279445df9eb698c3e3/oak-store-composite/src/main/java/org/apache/jackrabbit/oak/composite/checks/NodeStoreChecksService.java#L41)
>  executes all bound {{MountedNodeStoreChecker}} s which have been there at 
> the time of activation.
> The references are not greedily referenced and also there is no wait for 
> specific {{MountedNodeStoreChecker}} services to be active.
> That leads to the fact that the usage of {{NodeStoreChecksService}} in 
> {{CompositeNodeStoreService.registerCompositeNodeStore(...)}} is not 
> deterministic as the starting order of OSGi services determine which 
> {{MountedNodeStoreChecker}} are active during 
> {{CompositeNodeStoreService.activate()}}.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to