[ https://issues.apache.org/jira/browse/CXF-7510?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16197221#comment-16197221 ]
Andriy Redko commented on CXF-7510: ----------------------------------- That's right, we need the transport to be passed to CXF servlet as well. The CXF/CDI should generally stay transparent (all based on extensions), but not the servlet part. So this code is correct: {code} params.add(new WebParam(CXFNonSpringJaxrsServlet.TRANSPORT_ID, SseHttpTransportFactory.TRANSPORT_ID)); {code} I gave your suggestion a second thought and decided to opt-out from explicit CDI annotations (falling to bean-discovery-mode="all"). The reason is that CXF is not really bound to CDI but if we explicitly add the `@Dependent` annontation to `SseFeature`, we would make this dependency unavoidable. It definitely applies well to `SseTransportCustomizationExtension`, but with `bean-discovery-mode="all"` we should be all set, right? Another option would be to move `SseTransportCustomizationExtension` to separate module for SSE+CDI integration, but it looks like a bit over kill. Sounds reasonable? There is one issue with your test case (CXFSseTest), the Thread.sleep() must be inside try-with-resources block, otherwise the SseEventSource is closed before having a chance to consume any events. Could you please try it out with latest 3.2.1-SNAPSHOT (should be published in a few hours)? Just committed a couple of fixes, the test is green with all the fixes :-) Thanks! > SSE integration in CDI abruptly fails with no indication why > ------------------------------------------------------------ > > Key: CXF-7510 > URL: https://issues.apache.org/jira/browse/CXF-7510 > Project: CXF > Issue Type: Bug > Reporter: John D. Ament > Assignee: Andriy Redko > > https://lists.apache.org/thread.html/10d99c0d013a3d23361a3898171e7bd2b311a509349433db3b6cacaa@%3Cusers.cxf.apache.org%3E > has more details > Intermittently, when bootstrapping CXF + CDI, the integration for SSE will > fail. When it fails, there's no log messages indicating the issue, however > attempts to invoke any rest endpoint will give a warning like: > {code} > Sep 17, 2017 7:50:33 PM org.apache.cxf.transport.servlet.ServletController > invoke > WARNING: Can't find the request for http://my-hostname:4403/rest's Observer > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029)