InjectorWithContext injector = repository.getInjector(injectorName);
ContextProvider contextProvider = requestContextProvider.getContextProvider(injectorName);
if (contextProvider == null) {
ContextFactory factory = injector.getInstance(ContextFactory.class);
Context context = factory.getResourceResolverContext(resource.getResourceResolver());
contextProvider = new ConstantContextProvider(context);
}
injector.pushContextProvider(contextProvider);
return injector;
}