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

SSE SseBroadcaster implementation not performing onClose / onError callbacks

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.2.5
    • 3.2.6, 3.3.0
    • JAX-RS
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: