[
https://issues.apache.org/jira/browse/SLING-11189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17502951#comment-17502951
]
Julian Sedding commented on SLING-11189:
----------------------------------------
Purely with DS and OSGi R7, I think it could be done with a combination of the
{{*.target*}} *and the {{}}*{{.minimum.cardinality}} [reference
properties|http://docs.osgi.org/specification/osgi.cmpn/8.0.0/service.component.html#service.component-reference.properties].
The {{contentReader.target}} reference property would need to OR together a
list of {{component.name}} properties, i.e.
{{{}(|(component.name=org.apache.sling.jcr.contentloader.internal.readers.JsonReader)(component.name=org.apache.sling.jcr.contentloader.internal.readers.OrderedJsonReader)(component.name=org.apache.sling.jcr.contentloader.internal.readers.XmlReader)(component.name=org.apache.sling.jcr.contentloader.internal.readers.ZipReader)){}}}.
And the {{contentReader.minimum.cardinality}} property would need to be set to
the number of readers, i.e. 4 in this case.
Unless I am missing something, this should work. WDYT?
> Content Loader: Race condition registering readers vs. loading content
> ----------------------------------------------------------------------
>
> Key: SLING-11189
> URL: https://issues.apache.org/jira/browse/SLING-11189
> Project: Sling
> Issue Type: Bug
> Components: Extensions
> Affects Versions: JCR ContentLoader 2.5.0
> Reporter: Stefan Seifert
> Assignee: Stefan Seifert
> Priority: Major
>
> in SLING-11168 we detected a specific problem with Composum in Sling Starter
> 12, which only occured on Windows 10 environments (and even there not
> consistently in every scenario).
> it seems that it may happen that Sling-Initial-Content is loaded from the
> bundles when the ContentReader implementations are not yet registered on the
> ContentReaderWhiteboard.
> when this happens, the content is loaded into the repository, but files like
> *.json are not transformed to nodes and properties, but is stored as binary
> json files in the repository.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)