Hi,

On 12.03.20, 00:04, "Matt Ryan" <[email protected]> wrote:
> Further digging revealed what I suspected - that the ObservationManager
> approach actually uses an Observer registered with the whiteboard under
> the covers.
> 
> The question remains though - why the two approaches, and in specific
> why are indexes registered as Observers rather than via the
> ObservationManager method?

The main difference is at what layer an Observer is registered compared
to a JCR EventListener. An Observer gets the new root state of the repository
and it is up to the implementation to figure out what changed. A JCR
EventListener gets the actual changes as events. Another major difference
is authorization. An Observer sees everything and basically runs with admin
privileges, while a JCR EventListener is restricted to only see events for
changes on nodes the corresponding Session is able to read.

Regards
 Marcel

Reply via email to