Avoid duplicates from <websocket:decorator-factory>
Before this change <websocket:decorator-factory> decorated to the SubProtocolWebSocketHandler RootBeanDefinition rather than using a RuntimeBeanReference, which led to a separate instance of SubProtocolWebSocketHandler to be created. Issue: SPR-13190
This commit is contained in:
@@ -260,7 +260,7 @@ class MessageBrokerBeanDefinitionParser implements BeanDefinitionParser {
|
||||
if (factoriesElement != null) {
|
||||
ManagedList<Object> factories = extractBeanSubElements(factoriesElement, context);
|
||||
RootBeanDefinition factoryBean = new RootBeanDefinition(DecoratingFactoryBean.class);
|
||||
factoryBean.getConstructorArgumentValues().addIndexedArgumentValue(0, handlerDef);
|
||||
factoryBean.getConstructorArgumentValues().addIndexedArgumentValue(0, result);
|
||||
factoryBean.getConstructorArgumentValues().addIndexedArgumentValue(1, factories);
|
||||
result = new RuntimeBeanReference(registerBeanDef(factoryBean, context, source));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user