Hi Jörg,

may it be, that your ResourceChangeListener is registered for the
ChangeTypes PROVIDER_ADDED and PROVIDER_REMOVED?

If so then this is expected behaviour. IIRC for servlets being registered
on a resourceType at least 2 ResourceProviders get registered:
/libs/foo/bar and /libs/foo/bar/GET.servlet.

See /system/console/services?filter=%28provider.root%3D*foo%2Fbar*%29

Kind regards,
Dirk

On Thu, Apr 9, 2020 at 6:27 PM Jörg Hoh <jhoh...@googlemail.com.invalid>
wrote:

> Hi Sling community,
>
> I am investigating into an interesting case where a ResourceChangeListener
> is triggered too often.
>
> I have a ResourceChangeListener component, for which the resource.paths
> property is configured like this: [settings/granite/operations/maintenance,
> /conf/global/settings/granite/operations/maintenance]
> This listener is invoked when I disable a servlet which is registered to to
> the resourcetype "foo/bar" (and it affects any deployment quite heavily).
> Just based on the configuration I would assume, that this specific listener
> is never invoked at all, because all potential location (all combinations
> of the resource searchpaths as prefix with the resourcetype appended) are
> not covered by the definition of the ResourceChangeListener.
>
> The impact is rather dramatic, as this ResourceChangeListener is triggering
> quite a lot of activity, which slows down the deployments. Interestingly
> it's not affecting "regular changes" in the resource tree / Oak repository.
> Other listeners are invoked as well, but their impact doesn't seem to be
> that big.
>
> I can reproduce this with the ResourceResolver bundle version 1.6.8 and
> 1.5.34; I was first assuming that it's related to SLING-9040, but because
> an older version is affected as well, it's seems to have a different root
> cause.
>
> Did someone come across this already?
>
> Jörg
>
> --
> Cheers,
> Jörg Hoh,
>
> http://cqdump.wordpress.com
> Twitter: @joerghoh
>


-- 

Dirk Rudolph | Senior Software Engineer

Netcentric AG

M: +41 79 642 37 11
D: +49 174 966 84 34

dirk.rudo...@netcentric.biz | www.netcentric.biz

Reply via email to