Fix <websocket:interceptors> default configuration
Adding a ChannelInterceptor does not suppress default executor settings anymore in the XML namespace. Issue: SPR-11623
This commit is contained in:
committed by
Rossen Stoyanchev
parent
119dfd9cf9
commit
fb7d81c4a2
@@ -176,9 +176,10 @@ class MessageBrokerBeanDefinitionParser implements BeanDefinitionParser {
|
||||
ParserContext parserCxt, Object source) {
|
||||
|
||||
RootBeanDefinition executorDef = null;
|
||||
Element executor = null;
|
||||
|
||||
if (channelElement != null) {
|
||||
Element executor = DomUtils.getChildElementByTagName(channelElement, "executor");
|
||||
executor = DomUtils.getChildElementByTagName(channelElement, "executor");
|
||||
if (executor != null) {
|
||||
executorDef = new RootBeanDefinition(ThreadPoolTaskExecutor.class);
|
||||
String attrValue = executor.getAttribute("core-pool-size");
|
||||
@@ -199,7 +200,7 @@ class MessageBrokerBeanDefinitionParser implements BeanDefinitionParser {
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (!channelName.equals("brokerChannel")) {
|
||||
if ((channelElement == null && !channelName.equals("brokerChannel")) || (channelElement != null && executor == null)) {
|
||||
executorDef = new RootBeanDefinition(ThreadPoolTaskExecutor.class);
|
||||
executorDef.getPropertyValues().add("corePoolSize", Runtime.getRuntime().availableProcessors() * 2);
|
||||
executorDef.getPropertyValues().add("maxPoolSize", Integer.MAX_VALUE);
|
||||
|
||||
Reference in New Issue
Block a user