}
private ScheduledExecutorService buildAndConfigureScheduledExecutorService(String factoryName, Properties p, String componentName) throws Exception {
Properties props = new Properties(); // defensive copy
if (p != null && !p.isEmpty()) props.putAll(p);
ScheduledExecutorFactory f = (ScheduledExecutorFactory) Util.getInstance(factoryName, globalConfiguration.getClassLoader());
setComponentName(componentName, props);
setDefaultThreadPrio(KnownComponentNames.getDefaultThreadPrio(componentName), props);
return new LazyInitializingScheduledExecutorService(f, props);
}