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

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

Lukasz Wysocki created CXF-7804:
-----------------------------------

             Summary: 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


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)