throw new ServletException("Only singleton and prototype scopes are supported");
}
boolean isPrototype = SERVICE_SCOPE_REQUEST.equals(scope);
Map<Class, ResourceProvider> map = new HashMap<Class, ResourceProvider>();
for (Class c : resourceClasses) {
map.put(c, isPrototype ? new PerRequestResourceProvider(c)
: new SingletonResourceProvider(
createSingletonInstance(c, servletConfig), true));
}
return map;
}