Hi, There are cases when Sightly RuntimeExtensions might need to access the repository. Since creating multiple ResourceResolvers is not a cheap operation, especially with Jackrabbit, wouldn't it be better to enhance the RenderContext to make it provide the ResourceResolver available in the ScriptContext?
This ResourceResolver is already used by the Sightly engine for script rendering, so IMO it could also be passed down to RuntimeExtensions: final ResourceResolver scriptResourceResolver = (ResourceResolver) scriptContext.getAttribute(SlingScriptConstants.ATTR_SCRIPT_RESOURCE_RESOLVER, SlingScriptConstants.SLING_SCOPE); // line 78 of org.apache.sling.scripting.sightly.impl.engine.SightlyScriptEngine WDYT? Cheers, Radu
