Remove synchronized keywords from SockJsSession impls
Before this change SockJsSession implementations of WebSocketSession
used synchronization around its method implementations protecting
internal state and ensuring only a single thread is sending messages
at a time.
A WebSocketSession is generally expected to be used from one thread
at a time and now that application messages are sent through
ConcurrentWebSocketSessionDecorator, there is no concern about
application messages sent from the different threads.
While there are some remaining concerns, those can be addressed
without using the synchronized keyword. This change removes it from
the methods of all SockJS session implementations.
Issue: SPR-11450
@ -271,53 +271,59 @@ public class TransportHandlingSockJsService extends AbstractSockJsService implem
@@ -271,53 +271,59 @@ public class TransportHandlingSockJsService extends AbstractSockJsService implem
@ -69,10 +70,10 @@ public class EventSourceTransportHandler extends AbstractHttpSendingTransportHan
@@ -69,10 +70,10 @@ public class EventSourceTransportHandler extends AbstractHttpSendingTransportHan
@ -133,15 +133,15 @@ public class HtmlFileTransportHandler extends AbstractHttpSendingTransportHandle
@@ -133,15 +133,15 @@ public class HtmlFileTransportHandler extends AbstractHttpSendingTransportHandle
@ -69,12 +70,12 @@ public class XhrStreamingTransportHandler extends AbstractHttpSendingTransportHa
@@ -69,12 +70,12 @@ public class XhrStreamingTransportHandler extends AbstractHttpSendingTransportHa
@ -43,7 +44,7 @@ public class PollingSockJsSession extends AbstractHttpSockJsSession {
@@ -43,7 +44,7 @@ public class PollingSockJsSession extends AbstractHttpSockJsSession {
@ -48,7 +48,7 @@ public class StreamingSockJsSession extends AbstractHttpSockJsSession {
@@ -48,7 +48,7 @@ public class StreamingSockJsSession extends AbstractHttpSockJsSession {
@ -87,13 +87,13 @@ public class StreamingSockJsSession extends AbstractHttpSockJsSession {
@@ -87,13 +87,13 @@ public class StreamingSockJsSession extends AbstractHttpSockJsSession {
@ -81,9 +81,6 @@ public class HttpSockJsSessionTests extends AbstractSockJsSessionTests<TestAbstr
@@ -81,9 +81,6 @@ public class HttpSockJsSessionTests extends AbstractSockJsSessionTests<TestAbstr
@ -96,8 +93,6 @@ public class HttpSockJsSessionTests extends AbstractSockJsSessionTests<TestAbstr
@@ -96,8 +93,6 @@ public class HttpSockJsSessionTests extends AbstractSockJsSessionTests<TestAbstr
@ -125,8 +120,8 @@ public class HttpSockJsSessionTests extends AbstractSockJsSessionTests<TestAbstr
@@ -125,8 +120,8 @@ public class HttpSockJsSessionTests extends AbstractSockJsSessionTests<TestAbstr
@ -137,14 +132,6 @@ public class HttpSockJsSessionTests extends AbstractSockJsSessionTests<TestAbstr
@@ -137,14 +132,6 @@ public class HttpSockJsSessionTests extends AbstractSockJsSessionTests<TestAbstr