1. 25 3月, 2014 5 次提交
    • S
      Add configuration for message buffer size limit · bbdb72d8
      Sebastien Deleuze 提交于
      BufferingStompDecoder message buffer size limit can now be configured
      with JavaConfig MessageBrokerRegistry.setMessageBufferSizeLimit() or
      with XML <websocket:message-brocker message-buffer-size="">.
      
      Issue: SPR-11527
      bbdb72d8
    • R
      Add BufferingStompDecoder · ebffd67b
      Rossen Stoyanchev 提交于
      Before this change the StompDecoder decoded and returned only the first
      Message in the ByteBuffer passed to it. So to obtain all messages from
      the buffer, one had to loop passing the same buffer in until no more
      complete STOMP frames could be decoded.
      
      This chage modifies StompDecoder to return List<Message> after
      exhaustively decoding all available STOMP frames from the input buffer.
      Also an overloaded decode method allows passing in Map that will be
      populated with any headers successfully parsed, which is useful for
      "peeking" at the "content-length" header.
      
      This change also adds a BufferingStompDecoder sub-class which buffers
      any content left in the input buffer after parsing one or more STOMP
      frames. This sub-class can also deal with fragmented messages,
      re-assembling them and parsing as a whole message.
      
      Issue: SPR-11527
      ebffd67b
    • J
      DispatcherServlet logs request URI in encoded form only · 465ca24a
      Juergen Hoeller 提交于
      Issue: SPR-11591
      465ca24a
    • J
      Polishing · 53352882
      Juergen Hoeller 提交于
      53352882
    • J
      Revised ResizableByteArrayOutputStream as an actual subclass of... · dd7f54c3
      Juergen Hoeller 提交于
      Revised ResizableByteArrayOutputStream as an actual subclass of ByteArrayOutputStream, and consistently applied appropriate ByteArrayOutputStream initial capacities across the codebase
      
      Issue: SPR-11594
      dd7f54c3
  2. 24 3月, 2014 16 次提交
  3. 23 3月, 2014 6 次提交
    • R
      7af74b24
    • R
      Adjust SockJS scheduler core pool size · 2c6d6b52
      Rossen Stoyanchev 提交于
      Issue: SPR-11556
      2c6d6b52
    • R
      Polish · 7651f83b
      Rossen Stoyanchev 提交于
      7651f83b
    • R
      Add CloseStatus to indicate unreliable session · cbd5af3a
      Rossen Stoyanchev 提交于
      When a send timeout is detected, the WebSocket session is now closed
      with a custom close status that indicates so. This allows skipping
      parts of the close logic that may cause further hanging.
      
      Issue: SPR-11450
      cbd5af3a
    • R
      Remove synchronized keywords from SockJsSession impls · 4028a3b0
      Rossen Stoyanchev 提交于
      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
      4028a3b0
    • R
      Improve ConcurrentWebSocketSessionDecorator · ffac748f
      Rossen Stoyanchev 提交于
      Before this change the decorator ensured that for a specific WebSocket
      session only one thread at a time can send a message. Other threads
      attempting to send would have their messages buffered and each time
      that occurs, a check is also made to see if the buffer limit has been
      reached or the send time limit has been exceeded and if so the session
      is closed.
      
      This change adds further protection to ensure only one thread at a time
      can perform the session limit checks and attempt to close the session.
      Furthermore if the session has timed out and become unresponsive,
      attempts to close it may block yet another thread. Taking this into
      consideration this change also ensures that state associated with the
      session is cleaned first before an attempt is made to close the session.
      
      Issue: SPR-11450
      ffac748f
  4. 21 3月, 2014 11 次提交
    • R
      Remove synchronized block around WebSocketSession.send · 299be082
      Rossen Stoyanchev 提交于
      Since we now wrap the WebSocketSession with a concurrent decorator, the
      synchronized keyword around message sending needed to be removed.
      
      Issue: SPR-11586
      299be082
    • S
      Polish ASM-based annotation processing · 796af90b
      Sam Brannen 提交于
      - AnnotationAttributesReadingVisitor no longer processes annotations
        from the java.lang.annotation package.
      
      - Simplified logic in AnnotationReadingVisitorUtils
        getMergedAnnotationAttributes().
      
      Issue: SPR-11574
      796af90b
    • J
      BufferedImageHttpMessageConverter ignores empty MIME types · 90e3dbb0
      Juergen Hoeller 提交于
      Issue: SPR-11581
      90e3dbb0
    • J
      Javadoc: @ComponentScan is subject to @Conditional as well · 3aff973d
      Juergen Hoeller 提交于
      Issue: SPR-11579
      3aff973d
    • R
      Raise MessageConversionException in @Payload resolver · 929e9ca4
      Rossen Stoyanchev 提交于
      If a payload is present but conversion returns null (meaning no
      converter knows how to convert), raise a MessageConversionException
      that provides information about the type we were trying to convert
      to and the message itself whose headers (namely content-type) contain
      crucial information required to debug the problem.
      
      Issue: SPR-11577
      929e9ca4
    • B
      Set custom handshakeHandler for XML sockjs config · 26309838
      Brian Clozel 提交于
      Prior to this commit, configuring a custom handshakeHandler when setting
      up a stomp-endpoint with SockJS would not be taken into account:
      
        <websocket:stomp-endpoint path="/foo">
          <websocket:handshake-handler ref="customHandler"/>
          <websocket:sockjs/>
        </websocket:stomp-endpoint>
      
      This commit fixes this by creating and registering a
      WebsocketTransportHandler (with this handshakeHandler) as a
      transportHandler override for the SockJSService.
      
      Issue: SPR-11568
      26309838
    • R
      Add concurrent WebSocket session decorator (temp commit) · b7a97411
      Rossen Stoyanchev 提交于
      Issue: SPR-11586
      b7a97411
    • R
      ac968e94
    • R
      Ensure default value of @Payload required is enforced · d4782647
      Rossen Stoyanchev 提交于
      When no @Payload is provided, it is equivalent to @Payload with default
      attribute values. Since the default value of required=true, then
      an argument that's not annotated is required.
      d4782647
    • S
      Fix handling of required payload. · 52c3f713
      Stephane Nicoll 提交于
      A payload that is required will now throw an appropriate exception
      regardless of if a conversion is required or not.
      
      isEmptyPayload now takes the payload instead of the message
      so that both the original payload and the converted payload, if
      necessary, share the same logic.
      
      JSR-303 validation is now consistently applied.
      
      Issue: SPR-11577
      52c3f713
    • S
      Harmonize log configuration · 4cd818b9
      Stephane Nicoll 提交于
      Prior to this commit, the codebase was using a mix of log4j.xml
      and log4j.properties for test-related logging configuration. This
      can be an issue as log4j takes the xml variant first when looking
      for a default bootstrap configuration.
      
      In practice, some modules declaring the properties variant were
      taking the xml variant configuration from another module.
      
      The general structure of the configuration has also been
      harmonized to provide a standard console output as well as an
      easy way to enable trace logs for the current module.
      4cd818b9
  5. 20 3月, 2014 2 次提交