activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dejan Bosanac (JIRA)" <j...@apache.org>
Subject [jira] [Created] (AMQ-3955) WebSocket Transport - Race condition starting transport
Date Wed, 01 Aug 2012 10:45:02 GMT
Dejan Bosanac created AMQ-3955:
----------------------------------

             Summary: WebSocket Transport - Race condition starting transport
                 Key: AMQ-3955
                 URL: https://issues.apache.org/jira/browse/AMQ-3955
             Project: ActiveMQ
          Issue Type: Bug
    Affects Versions: 5.6.0
            Reporter: Dejan Bosanac
            Assignee: Dejan Bosanac
             Fix For: 5.7.0


In the StompServlet, when a websocket request comes in, we are starting up the broker's websocket
connection when we call listener.onAccept(socket). 
Under the covers, it begins a task in a new thread to create the connection, instantiate the
transport listener, and set the listener on the transport. However, this is done asynchronously,
and when the StompServlet calls listener.onAccept(socket), it immediately returns to the underlying
jetty websockets implementation, returning the StompSocket (which as the websocket onTextMessage
listener). It seems it's possible the jetty code could call back the onTextMessage listener's
onMessage(...) method and expect the StompSocket to process the Stomp message before the steps
taken to complete creating the connection from the async listener.onAccept(..) call.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message