private ThreadPoolConfiguration createThreadPoolConfiguration(String threadPoolName, String componentName) {
ThreadPoolConfigurationBuilder threadPool = threadPools.get(threadPoolName);
if (threadPool == null)
throw log.undefinedThreadPoolName(threadPoolName);
ThreadPoolConfiguration threadPoolConfiguration = threadPool.create();
DefaultThreadFactory threadFactory = threadPoolConfiguration.threadFactory();
threadFactory.setComponent(shortened(componentName));
return threadPoolConfiguration;
}