You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Andriy Redko (JIRA)" <ji...@apache.org> on 2018/07/23 22:39:00 UTC

[jira] [Resolved] (CXF-7804) SSE SseBroadcaster implementation not performing onClose / onError callbacks

     [ https://issues.apache.org/jira/browse/CXF-7804?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andriy Redko resolved CXF-7804.
-------------------------------
       Resolution: Fixed
    Fix Version/s: 3.3.0
                   3.2.6

> SSE SseBroadcaster implementation not performing onClose / onError callbacks
> ----------------------------------------------------------------------------
>
>                 Key: CXF-7804
>                 URL: https://issues.apache.org/jira/browse/CXF-7804
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 3.2.5
>            Reporter: Lukasz Wysocki
>            Assignee: Andriy Redko
>            Priority: Major
>             Fix For: 3.2.6, 3.3.0
>
>
> The class {{org.apache.cxf.jaxrs.sse.SseBroadcasterImpl}} does not uphold the contract stated in {{javax.ws.rs.sse.SseBroadcaster}} interface.
> The registered {{onError}} and {{onClose}} callbacks are not called when {{SseEventSink}} is closed or there is an communication error/timeout.
> It seems the problem can be pinpointed to anonymous implementation of {{AsyncListener}} registered in {{AsyncContext}} from {{SseBroadcasterImpl.register}} method (GitHub link [HERE|https://github.com/apache/cxf/blob/8eab54c2a285ac91b0a04b8cd7e899d45f15b73a/rt/rs/sse/src/main/java/org/apache/cxf/jaxrs/sse/SseBroadcasterImpl.java#L55]).
> Seems like extending the {{onComplete}} and {{onTimeout}}/{{onError}} methods to do additional calls to {{closers.forEach}} and {{exceptioners.forEach}} might solve this.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)