THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
The JAX-RS 2.1 introduced the support of server-sent events (SSE). Although SSE in general works on top of HTTP transport, the SSE implementation in CXF uses the dedicated one, based on Atmosphere framework. This transport is fully compatible with HTTP one.
Configuration
There are several ways to configure SSE transport (and as the consequence, SSE support). The most straightforward one is to pass the init parameter "transportId" to the CXF servlet in question, for example:
Code Block |
---|
final CXFNonSpringServlet cxfServlet = new CXFNonSpringServlet();
final ServletHolder holder = new ServletHolder(cxfServlet);
holder.setInitParameter(CXFCdiServlet.TRANSPORT_ID, SseHttpTransportFactory.TRANSPORT_ID);
... |