[
https://issues.apache.org/jira/browse/SLING-6361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15851580#comment-15851580
]
David Gonzalez commented on SLING-6361:
---------------------------------------
Per off-jira convo - recording here for posterity.
You should implement the new ResourceProvider SPI [1] and use that API to emit
your events. It's correct that ResourceChangeListeners do not see the events
emitted via the event admin
[1]http://static.javadoc.io/org.apache.sling/org.apache.sling.api/2.11.0/org/apache/sling/spi/resource/provider/package-summary.html
> ResourceChangeListeners do not hear changes on events emitted against
> ResourceProvider provided paths
> -----------------------------------------------------------------------------------------------------
>
> Key: SLING-6361
> URL: https://issues.apache.org/jira/browse/SLING-6361
> Project: Sling
> Issue Type: Bug
> Reporter: David Gonzalez
>
> I have a resource provider exposing non-JCR resources under `/virtual-mount`
> and am issuing my own Resource Change Events like so:
> {noformat}
> Map<String, String> props = new HashMap<String, String>();
> props.put(SlingConstants.PROPERTY_PATH, "/virtual-mount/some/path");
> eventAdmin.sendEvent(new Event(SlingConstants.TOPIC_RESOURCE_CHANGED, props));
> {noformat}
> It does not appear any ResourceChangeListener hears these events; Those
> provided by Sling or custom RCL's. Are there special considerations to ensure
> Events are heard for paths covered by custom ResourceProviders?
> I am the ResourceResolver bundle 1.5.4 initial, and now on 2.9.2 (can provide
> other Sling bundle versions as needed; im not quite sure which facet of Sling
> is responsible for this)
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)