JAX-RS 2.1 Server Side Eventing Example (SSE)
You need to install locally JAX-RS 2.1 API resteasy branch and RESTEasy jsr370 branch
You also need WildFly instance with installed JAX-RS 2.1 API and RESTEasy JAX-RS 2.1 implementation.
To install RESTEasy jsr370 branch bits you will run mvn install
, so the easiest option is to use already patched WildFly instance from the testsuite - for example
testsuite/integration-tests/target/test-server/wildfly-10.1.0.Final
.
All you need is to invoke Maven and WildFly Maven Plugin, running WildFly server is expected.
mvn package wildfly:deploy
JS based client logic is included in index.html of the deployed web application.
Open http://127.0.0.1:8080/resteasy-sse/index.html or http://127.0.0.1:8080/resteasy-sse/multi.html in your web browser
beans.xml had to be removed as @Context private Sse sse;
was not working properly (receiving null).