Hi,
Currently the javadoc at 
https://www.javadoc.io/doc/org.apache.sling/org.apache.sling.api/latest/org/apache/sling/api/resource/observation/ResourceChangeListener.html
 does not specify when exactly the listener is called and if that happens 
synchronously or asynchronously. If it happens synchronously it should also be 
clarified if other ResourceResolvers already may see those changes or not yet.

Looking at 
https://github.com/apache/sling-org-apache-sling-jcr-resource/blob/fe35d53a1b0f8ff1a7616909f16539b759bd0bdd/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceListener.java#L97
 it seems it inherits from 
https://developer.adobe.com/experience-manager/reference-materials/spec/javax.jcr/javadocs/jcr-2.0/javax/jcr/observation/EventListener.html

"Event listeners are notified asynchronously, and see events after they occur 
and the transaction is committed.”

I think adding a similar sentence to the Javadoc of ResourceChangeListener 
would be helpful. WDYT?
Are all event listeners of resource resolvers supposed to behave like this?

Konrad

Reply via email to