Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-2844

AsyncContext gets "complete" after second request.startAsync()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 7.1.0.CR1
    • 7.1.0.Beta1
    • Web
    • None

    Description

      I have a simple test sevlet with asyncSupported = true.

      In the service() method it is first checked whether it is an initial invokation (request.getAttribute(ASYNC_STARTED) == null).
      If it is, startAsync() is invoked and a timer started wich calls asyncContext.dispatch() for several times.

      After that we get back to service() method, which this time sees that async has been started, sends some data to client (from request attribute), and starts async context again (if not told not to do so, via request attribute).

      The listener just logs all the events.

      The expected behavior is that the async context gets (re)"started" several times, client receives several portions of data and after that the asyncContext gets "complete".

      In tomcat it works as expected. A few lines from tomcat log: https://gist.github.com/1408639

      And in jboss the async context gets "complete" just after the first portion sent and startAsync() is called for the second time (and after the "start" event sent to listener).
      Log: https://gist.github.com/1408645

      Attachments

        Activity

          People

            rmaucher Remy Maucherat
            yurique_jira Yuriy Malchenko (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: