1. 26 6月, 2014 6 次提交
    • R
      Create SockJS ThreadPoolTaskScheduler extension · 6ad79e03
      Rossen Stoyanchev 提交于
      Commit 5d2e6f enabled the setRemoveOnCancelPolicy of the SockJS
      ScheduledThreadPoolExecutor by default. However that property is only
      available in JDK 1.7 or later. This change fixes the issue and
      introduces an extension of ThreadPoolTaskScheduler for for use with
      SockJS which is necessary in any case since ThreadPoolTaskScheduler
      does not expose the underlying ScheduledThreadPoolExecutor otherwise.
      
      Issue: SPR-11918
      6ad79e03
    • R
      Merge SockJS client-related changes · 3ed9885d
      Rossen Stoyanchev 提交于
      3ed9885d
    • R
      Use SimpleAsyncTaskExecutor in WebSocketClient impls · 1e342e4d
      Rossen Stoyanchev 提交于
      JettyWebsocketClient and StandardWebSocketClient now use the
      SimpleAsyncTaskExecutor by default to ensure non-blocking connect.
      1e342e4d
    • R
      Prevent unbounded retention of cancelled SockJS tasks · 5d2e6f6d
      Rossen Stoyanchev 提交于
      This change sets the removeOnCancelPolicy on the SockJS
      ScheduledThreadPoolExecutor to true. This ensures that cancelled
      tasks are removed immediately to avoid the "unbounded retention
      of cancelled tasks" that is mentioned in the Javadoc of
      ScheduledThreadPoolExecutor:
      
      "By default, such a cancelled task is not automatically removed from
      the work queue until its delay elapses. While this enables further
      inspection and monitoring, it may also cause unbounded retention of
      cancelled tasks. To avoid this, set setRemoveOnCancelPolicy to true,
      which causes tasks to be immediately removed from the work queue at
      time of cancellation."
      
      Issue: SPR-11918
      5d2e6f6d
    • R
      Fix concurrency issues in SockJS session impls · fcf6ae83
      Rossen Stoyanchev 提交于
      This change ensures the server "WebSocketHandler" is notified of the
      opening of a session before writing the open frame to the remote
      handler. Any messages sent by the server "WebSocketHandler" while
      getting notified of the opening get cached and flushed after the open
      frame has been written.
      
      This change introduces locking in AbtractHttpSockJsSession to guard
      access to the HTTP response. The goal is to prevent contention between
      client requests to receive messages (i.e. long polling) and
      the application trying to write.
      
      Issue: SPR-11916
      fcf6ae83
    • R
      Add SockJS client · e82df99a
      Rossen Stoyanchev 提交于
      This change adds a new implementation of WebSocketClient that can
      connect to a SockJS server using one of the SockJS transports
      "websocket", "xhr_streaming", or "xhr". From a client perspective
      there is no implementation difference between "xhr_streaming" and
      "xhr". Just keep receiving and when the response is complete,
      start over. Other SockJS transports are browser specific
      and therefore not relevant in Java ("eventsource", "htmlfile" or
      iframe based variations).
      
      The client loosely mimics the behavior of the JavaScript SockJS client.
      First it sends an info request to find the server capabilities,
      then it tries to connect with each configured transport, falling
      back, or forcing a timeout and then falling back, until one of the
      configured transports succeeds.
      
      The WebSocketTransport can be configured with any Spring Framework
      WebSocketClient implementation (currently JSR-356 or Jetty 9).
      
      The XhrTransport currently has a RestTemplate-based and a Jetty
      HttpClient-based implementations. To use those to simulate a large
      number of users be sure to configure Jetty's HttpClient executor
      and maxConnectionsPerDestination to high numbers. The same is true
      for whichever underlying HTTP library is used with the RestTemplate
      (e.g. maxConnPerRoute and maxConnTotal in Apache HttpComponents).
      
      Issue: SPR-10797
      e82df99a
  2. 25 6月, 2014 13 次提交
  3. 24 6月, 2014 3 次提交
  4. 22 6月, 2014 1 次提交
  5. 20 6月, 2014 8 次提交
  6. 19 6月, 2014 2 次提交
  7. 18 6月, 2014 1 次提交
  8. 17 6月, 2014 5 次提交
  9. 14 6月, 2014 1 次提交