ExternalContext externalContext = facesContext.getExternalContext();
// Setup ServiceProviderFinder
ServiceProviderFinder spf = ServiceProviderFinderFactory.getServiceProviderFinder(
externalContext);
Map<String, List<String>> spfConfig = spf.calculateKnownServiceProviderMapInfo(
externalContext, ServiceProviderFinder.KNOWN_SERVICES);
if (spfConfig != null)
{
spf.initKnownServiceProviderMapInfo(externalContext, spfConfig);
}