Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-7804

SSE SseBroadcaster implementation not performing onClose / onError callbacks

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.2.5
    • Fix Version/s: 3.2.6, 3.3.0
    • Component/s: JAX-RS
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      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).
      Seems like extending the onComplete and onTimeout/onError methods to do additional calls to closers.forEach and exceptioners.forEach might solve this.

        Attachments

          Activity

            People

            • Assignee:
              reta Andriy Redko
              Reporter:
              LWysocki Lukasz Wysocki
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: