/** * Get a registrar factory from the application class loader. * * @return The ServiceRegistrarFactory object. */ private static ServiceRegistrarFactory createFactory() { final ServiceRegistrarFactory factory; final ServiceRegistrarFactory installed; try { installed = ServiceRegistrarLoader.load(); } catch (ServiceRegistrarLoadingException e) { throw new RuntimeException("Unable to load service registrar", e); } if (installed == null) { log.debug("No service registrar plugin configured"); factory = new NopServiceRegistrarFactory(); } else { factory = installed; final String name = factory.getClass().getName(); log.info("Loaded installed service registrar: {}", name); } return factory; } }
/** * Get a registrar factory from the application class loader. * * @return The ServiceRegistrarFactory object. */ private static ServiceRegistrarFactory createFactory() { final ServiceRegistrarFactory factory; final ServiceRegistrarFactory installed; try { installed = ServiceRegistrarLoader.load(); } catch (ServiceRegistrarLoadingException e) { throw new RuntimeException("Unable to load service registrar", e); } if (installed == null) { log.debug("No service registrar plugin configured"); factory = new NopServiceRegistrarFactory(); } else { factory = installed; final String name = factory.getClass().getName(); log.info("Loaded installed service registrar: {}", name); } return factory; } }