[
https://issues.apache.org/jira/browse/CXF-5417?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13880677#comment-13880677
]
Andriy Redko edited comment on CXF-5417 at 1/24/14 2:49 AM:
------------------------------------------------------------
Hi Sergey,
Finally, I have got everything lined up and working. Please take a look on the
patch (patch-connection-callback-tests.txt) which provides couple of fixes and
adds the test case for Connection Callback:
{code}
signal ready
server ready
ConnectionCallback: onDisconnect, client disconnects
stopping bus
server passed
server stopped
{code}
I have changed a bit the implementation for detecting the appropriate exception
type: by default, the real cause is being hidden by *.cxf.*.Fault exception. In
case of Jetty 9.x, the cause of this exception contains the real exception
(EofException). But in case of Jetty 8.x, there is another intermediate
exception in between. That's why there is a bit of logic to figure out if any
IOException has really taken place.
The test case does a small trick: it runs outside of JUnit server and client.
Client terminates without waiting the response from server and it causes
connection callback to be called. I hope you will be OK with those small
changes.
Thanks a lot!
Andriy
was (Author: reta):
Hi Sergey,
Finally, I have got everything lined up and working. Please take a look on the
patch (patch-connection-callback-tests.txt) which provides couple of fixes and
add the test case for Connection Callback:
{code}
signal ready
server ready
ConnectionCallback: onDisconnect, client disconnects
stopping bus
server passed
server stopped
{code}
I have change a bit the implementation for detecting the appropriate exception
type: by default, the real cause is being hidden by Fault exception. In case of
Jetty 9.x, the cause of this exception contains the real exception
(EofException). But in case of Jetty 8.x, there is another intermediate
exception in between. That's why there is a bit of logic to figure out if any
IOException has really taken place.
The test case does a small trick: it runs outside of JUnit server and client.
Client terminates without waiting the response from server and it causes
connection callback to be called. I hope you will be OK with those small
changes.
Thanks a lot!
Andriy
> 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-tests.txt,
> 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)