Skip to content
This repository has been archived by the owner on Nov 18, 2018. It is now read-only.

Fixing SockJS session handling for xhr/jsonp polling. #72

Merged
merged 1 commit into from
Mar 12, 2014
Merged

Fixing SockJS session handling for xhr/jsonp polling. #72

merged 1 commit into from
Mar 12, 2014

Commits on Mar 12, 2014

  1. Fixing SockJS session handling for xhr/jsonp polling.

    The is a re-opening of AGSMPLPUSH-42 which intended to fix this issue
    but the fix was just plain wrong.
    
    The original issue was that the polling transports did to reply with any
    data when messages had been sent to them. The fix then was to add an
    explicit empty reply to trigger SockJS to repoll and it was then able
    to retrieve data.
    But the polling transports are "long polling" in that they will remain
    until either data is made available by the server side or the session
    times out.
    
    This commit fixes the session handling by introducing a field in the
    SockJSSession class which is the ChannelHandlerContext used for an
    open connection. This 'openContext' is then available to be used
    by SessionState implementations, for example the PollingSessionState.
    PollingSessionState sometimes needs to use the ChannelHandlerContext
    used to connect which is needed to send the SockJS OpenFrame, but
    successive calls needs to use the ChannelHandlerContext for the
    open session.
    
    Additional changes:
    - SockJS test server can now be started with mvn exec:java
    - sockjs-client.html contains examples of specifying transports types
    
    [https://issues.jboss.org/browse/AGSMPLPUSH-42]
    danbev committed Mar 12, 2014
    Configuration menu
    Copy the full SHA
    6b9bf8c View commit details
    Browse the repository at this point in the history