AsyncContext gets "complete" after second request.startAsync()
--------------------------------------------------------------
Key: AS7-2844
URL:
https://issues.jboss.org/browse/AS7-2844
Project: Application Server 7
Issue Type: Bug
Components: Web
Affects Versions: 7.1.0.Beta1
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
Reporter: Yuriy Malchenko
Assignee: Remy Maucherat
Attachments: async-test.war
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
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira