Archie Cobbs opened SPR-9737 and commented

The <task:executor id="foo"> XML element automatically sets the thread name prefix to foo-.

This is usually sufficient, but I have a need to set a different thread name prefix from the bean name.

Request support for e.g. <task:executor id="foo" threadNamePrefix="bar-"> which would set the thread name prefix to bar- for that executor.


Affects: 3.1.2

Comment From: spring-projects-issues

skzr.org commented

<task:executor id="foo" threadNamePrefix="bar-">

you can write:

<task:executor id="bar"/>

or you can write:

<bean id="applicationEventMulticaster" class="org.springframework.context.event.SimpleApplicationEventMulticaster">

<!--    <property name="taskExecutor" ref="springEvent"/> -->

        <property name="taskExecutor">
            <bean class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor">
                <property name="threadNamePrefix" value="bar"/>
            </bean>
        </property>
</bean>

Comment From: spring-projects-issues

Sébastien Deleuze commented

Closing groups of outdated issues. Please reopen if still relevant.

Comment From: spring-projects-issues

Archie Cobbs commented

Re-opening issue because the request is still valid.

Comment From: spring-projects-issues

Bulk closing outdated, unresolved issues. Please, reopen if still relevant.

Comment From: archiecobbs

Bulk closing outdated, unresolved issues. Please, reopen if still relevant.

... except Github won't let me reopen it...

Comment From: rstoyanchev

Considering this is an old issue, today we would expect this to be declared in Java config. Can you clarify if this is still relevant and if so why? Generally, we don't intend to add additional attributes to the XML namespace.

Comment From: archiecobbs

Generally, we don't intend to add additional attributes to the XML namespace.

OK then don't :) It won't hurt my feelings. This issue is a minor detail and not worth the trouble.

FWIW I still like to use XML for configuration. There is still value in being "declarative". Also I have a bunch of legacy code still using XML. It's nice when that code continues to function.

Thanks.

Comment From: snicoll

We have no plans to deprecate and/or remove xml configuration, but we don't plan to make additional changes to it so I am going to close this.