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

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

Hi Andriy, I've decided to apply your patch right now, I did few modifications:

http://svn.apache.org/r1559673

First, I updated JAXRSOutInterceptor to wrap the escaped exceptions in Fault, 
using InternalServerErrorException to wrap the escaped exception was not quite 
right   - so now the async fault handling code in the HTTP transport  will 
become 'portable' across the front-ends.
Next, after updating all the signatures with a new Throwable parameter I 
thought, hmm, may be we can check Exception.class directly in 
Servlet3Continuation - hopefully this will work and will have no side-effects 
at all.
Finally, onDisconnect is called only if it has been determined the exception is 
most likely related to the client being disconnected: we can have IO exceptions 
thrown at the write time due to some MessageBodyWriter assuming a payload is 
broken, etc, with the client still listening, so IMHO it is reasonable to 
recommend users to set a contextual "disconnected.client.exception.class" 
property to a container-specific IO exception class name: we will document the 
exception class names known to be thrown by Tomcat and Jetty. Note, if the 
client knows that the only IO exception that can be thrown on the write is the 
one related to the disconnect (i.e, it is known the response data are well 
formatted, etc) then they'd just set the class name to java.io.IOException

Thanks, 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
>         Attachments: patch-connection-callback.txt
>
>
> 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