Hi,

On Thu, Jun 11, 2020 at 6:39 AM Gurudatta Pai <[email protected]> wrote:
>
> Hi All,
>
> I am using suspend/complete model for processing a request. 
> continuation.suspend() is called once the request is dispatched 
> asynchronously and continuation.complete() is called on response.
>
> I tried registering a listener with the continuation and onCompletion is 
> called once the complete is executed. The response is written as part of 
> onCompletion and we see that the response is written to the client properly.
>
> We see below description for onComplete.
>
>  Called when a continuation life cycle is complete and after any calls to 
> ServletRequestListener.requestDestroyed(javax.servlet.ServletRequestEvent) 
> The response may still be written to during the call.
>
> https://www.eclipse.org/jetty/javadoc/current/org/eclipse/jetty/continuation/ContinuationListener.html
>
> Can we use onComplete method to write the response to client or will it have 
> any race condition that may lead to response not getting written to client?
>
> Please advice.

Jetty Continuations have been discontinued, replaced by the standard
Servlet 3.0 APIs for asynchronous request/response processing.

You should update your code to use the standard Servlet 3.0 APIs.

-- 
Simone Bordet
----
http://cometd.org
http://webtide.com
Developer advice, training, services and support
from the Jetty & CometD experts.
_______________________________________________
jetty-users mailing list
[email protected]
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/jetty-users

Reply via email to