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

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

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 7.1.0.Beta1
    • Fix Version/s: 7.1.0.CR1
    • Component/s: Web
    • Labels:
      None
    • Environment:

      Linux malchenko 3.0.0-13-generic #22-Ubuntu SMP Wed Nov 2 13:27:26 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

      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

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                rmaucher Valued Customer
                Reporter:
                yurique Yuriy Malchenko
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: