SPR-6644 The 'id' value from an 'executor' element in the task namespace is now used as the thread name prefix for the resulting ThreadPoolTaskExecutor instance.

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@2772 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
Mark Fisher
2010-01-05 22:27:47 +00:00
parent 195667d8eb
commit 17c01fae30
2 changed files with 10 additions and 1 deletions
@@ -108,6 +108,9 @@ public class TaskExecutorFactoryBean implements FactoryBean<TaskExecutor>, BeanN
this.setValueIfNotNull("corePoolSize", range[0]);
this.setValueIfNotNull("maxPoolSize", range[1]);
}
if (this.beanName != null) {
this.beanWrapper.setPropertyValue("threadNamePrefix", this.beanName + "-");
}
this.target = (TaskExecutor) this.beanWrapper.getWrappedInstance();
if (this.target instanceof InitializingBean) {
((InitializingBean)this.target).afterPropertiesSet();