Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Jetty 9.0.4 issue (also in 9.0.5-SNAPSHOT) with Spring MVC Async (test provided)

Hi Simone,

Thanks for responding..

On Mon, Aug 12, 2013 at 4:49 AM, Simone Bordet <sbordet@xxxxxxxxxxx> wrote:
> I just checked the Servlet specification, and Jetty's behavior is correct.
> While this is explicit in Servlet 3.1, I would recommend that Spring
> does not rely on isAsyncStarted() because otherwise it will be broken
> in any Servlet 3.1 compliant container.
> From the specification (section, page 2-13):
> "public boolean isAsyncStarted() - Returns true if async processing has
> started on this request, and false otherwise. If this request has been
> dispatched using one of the AsyncContext.dispatch methods since it was put
> in asynchronous mode, or a call to AsynContext.complete is made, this
> method returns false."

True, however, the same section on page 2-16 adds:

"If any of the dispatch methods are called before the
container-initiated dispatch
that called startAsync has returned to the container, then the call
will not take
effect until after the container-initiated dispatch has returned to
the container."

So 2-13 says "has been dispatched" but the 2-16 adds the dispatch has
no effect until the current container thread has returned.

FWIW from the original report, the issue does not appear in Jetty 8
and I would have raised it if it did based my own testing since I
reported the same issue in Tomcat 7 where it was subsequently fixed
[1] ..


Back to the top