[ 
https://issues.apache.org/jira/browse/CXF-5417?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13871967#comment-13871967
 ] 

Sergey Beryozkin commented on CXF-5417:
---------------------------------------

Hi Andriy

> the issue is tricky but quite interesting

I knew I'd love working on it :-)

> how to check if the client is still connected (we can refer to it as a 
> heartbeat) in a way, that won't mess up with response content

What people seem to do is they  create a Socket, with setSoTimeout and treat 
the exceptions as a disconnect. Servlet3Continuation can get HTTPServletRequest 
from the message, using AbstractHttpDestination.HTTP_REQUEST property and I 
guess based on that it can open a Socket to the client. 
I wonder if it can work...
Cheers, Sergey



> Support optional JAX-RS 2.0 ConnectionCallback
> ----------------------------------------------
>
>                 Key: CXF-5417
>                 URL: https://issues.apache.org/jira/browse/CXF-5417
>             Project: CXF
>          Issue Type: Improvement
>          Components: JAX-RS, Transports
>            Reporter: Sergey Beryozkin
>            Priority: Minor
>
> https://jax-rs-spec.java.net/nonav/2.0/apidocs/javax/ws/rs/container/ConnectionCallback.html
> lets JAX-RS 2.0 applications receive the notifications when a given client 
> has disconnected.
> We can probably build something on top of the Jetty-specific connector and 
> also enhance CXF Continuation API. 



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to