/** * Creates the factory. */ public ServiceFactory() { try { // service finder used to load the effective finder class serviceFinderClass = new DefaultServiceFinder().findFirstServiceProvider(ServiceFinder.class); } catch (ClassNotFoundException ex) { // we cannot use LOGGER here because this may use the createService as well java.util.logging.Logger.getLogger(ServiceFactory.class.getName()).log(java.util.logging.Level.INFO, "cannot load ServiceFinder class -> fallback to " + DefaultServiceFinder.class.getName(), ex); serviceFinderClass = DefaultServiceFinder.class; } finderMap = new ConcurrentHashMap<>(); explicitLoaders = new HashMap<>(); }