cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Beryozkin (JIRA)" <>
Subject [jira] [Commented] (CXF-5417) Support optional JAX-RS 2.0 ConnectionCallback
Date Mon, 13 Jan 2014 13:31:50 GMT


Sergey Beryozkin commented on CXF-5417:

Hi Andriy, thanks, the only problem is that JAX-RS 2.0 ConnectionCallback can not be (indirectly)
detected in Servlet3Continuation constructor, the constructor code above will only work for
users working with CXF Continuations API directly.
Specifically, JAXRS AsyncResponse accepts callbacks in one of its register() methods. So in
CXF JAXRS AsyncResponseImpl will need to register itself as CXF ConnectionCallback wrapper
with its Continuation instance after the latter has been constructed, doing so earlier would
start a Timer which may not be even needed. One option here is to enhance Continuation interface
with a single registerCallback method, but may be we can simplify it  by reusing Continuation.setObject
So if the user code calls AsyncResponse.register(new MyConnectionCallback()), then we'd relay
it to Continuation.setObject and check inside Servlet3Continuation if it is CXF ConnectionCallback
- if yes then deal with it   

Cheers, Sergey

> Support optional JAX-RS 2.0 ConnectionCallback
> ----------------------------------------------
>                 Key: CXF-5417
>                 URL:
>             Project: CXF
>          Issue Type: Improvement
>          Components: JAX-RS, Transports
>            Reporter: Sergey Beryozkin
>            Priority: Minor
> 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

View raw message