Hi,

as noted in SLING-3400 we have a problem when a resource provider factory
is unregistered and a resource resolver is currently using a provider  from
this factory. In that case, that reference is never cleared.
This problem occurs due to long running resource resolvers.

I looked at solving this issue and my first idea was to simply remove the
reference to the provider if the factory is unregistered. Unfortunately,
this comes with the drawback that we have to keep a reference to all open
resource resolver (contexts) in order to notify them, once a factory is
removed.
Although this is feasible, while implementing it I came to the conclusion
that this is actually the wrong approach: a resource resolver is using /
has used a provider and this one silently disappears. This might cause some
trouble / unexpected behaviour.

So I rather think, once this happens all resource resolvers need to be
closed and recreated - the easiest way to do this is to unregister and
reregister the resource resolver factory. However, I think simply modifying
the service registration of the resolver factory would be the better option
and should do the trick.

WDYT?

Regards
Carsten
-- 
Carsten Ziegeler
cziege...@apache.org

Reply via email to