in src/main/java/org/apache/tomee/jakartaee/api/locator/ProviderLocator.java [270:290]
static private String locateServiceClassName(final String iface, final ClassLoader loader) {
if (loader != null) {
try {
// we only look at resources that match the file name, using the specified loader
final String service = "META-INF/services/" + iface;
final Enumeration<URL> providers = loader.getResources(service);
while (providers.hasMoreElements()) {
final List<String>providerNames = parseServiceDefinition(providers.nextElement());
// if there is something defined here, return the first entry
if (!providerNames.isEmpty()) {
return providerNames.get(0);
}
}
} catch (final IOException e) {
//ignore
}
}
// not found
return null;
}