Fix issue with StompSubProtocolHandler initialization

This change ensures that StompSubProtocolHandler is injected with an
ApplicationEventPublisher for both the Java and XML config.

Backport for:
0dddb6f3e1
4372dac002

Issue: SPR-11825
This commit is contained in:
Rossen Stoyanchev
2014-07-01 14:59:51 -04:00
parent 5092414842
commit e9ecaf6f4a
4 changed files with 11 additions and 22 deletions

View File

@@ -118,6 +118,8 @@ public class MessageBrokerBeanDefinitionParserTests {
assertNotNull(stompHandler);
assertEquals(128 * 1024, stompHandler.getMessageSizeLimit());
assertNotNull(new DirectFieldAccessor(stompHandler).getPropertyValue("eventPublisher"));
httpRequestHandler = (HttpRequestHandler) suhm.getUrlMap().get("/test/**");
assertNotNull(httpRequestHandler);
assertThat(httpRequestHandler, Matchers.instanceOf(SockJsHttpRequestHandler.class));