As I haven't received any feedback on this email thread apart from
Mark's original suggestions
in the SERVLET_SPEC-17,I take it that everyone is ok with the changes to
the upgrade handling as
outlined in the email. I will go ahead and incorporate the changes in
the spec.
Shing Wai Chan
On 12/4/12 1:34 PM, Shing Wai Chan wrote:
> In previous discussion, we discuss the behavior of AsyncListener when
> there is an exception while calling onCompleted.
> With previous discussion and
> http://java.net/jira/browse/SERVLET_SPEC-17, there are three
> possibilities:
> a) log an exception and continue call subsequent listeners
> b) call onError
> c) the request is in an error state
>
> The javadoc of AsyncListener#onCompleted says:
> Notifies this AsyncListener that an asynchronous operation has
> been completed.
>
> I have also compared with the CompletionHandler in JDK 7.
> An exception is log in their case.
>
> (a) seems to be a better choice in this case.
>
> I have took a look at implementation in Tomcat and GlassFish and
> notice that the exception for
> AsyncListener#onStartAsync is propagated back to the caller of
> AsyncContext#startAsync.
> Servlet 3.0 is spec does "not" mention this.
> If we have (a) above, an exception will log in this case and will
> "not" propagated back to the caller.
>
> In this case, I would like to confirm that there will be no issue in
> choosing (a).
> Please let me know if there is any concern.
> Thanks.
> Shing Wai Chan
>
>
>
>
>