2

Has anybody implemented JSF 2.3 + Spring Boot + Websockets? I am using JoinFaces and I am trying to enable end-to-end implementation with WebSockets using the new tag provided by JSF 2.3.

I have found some answers using JSF 2.2 with proprietary sockets implementation (for instance, Primefaces https://github.com/elitcenk/Primefaces-Websocket-using-SpringBoot).

Looking at the issue below, it makes me believe that trying to implement the JSF 2.3 WebSockets won't lead me anywhere: https://jira.spring.io/browse/SPR-17202

After investigating JoinFaces code, I was able to find the following property to enable the WebSocket inside JavaxFaces2_3Properties.java:

jsf.javax.faces.ENABLE_WEBSOCKET_ENDPOINT=true

However, beyond setting up this property, it looks like that JoinFaces does not support Spring injection of Websockets.

  • Nope, Spring choosed to not fully support CDI even though they were given the chance. "No proper SPI" as mentioned in the JIRA issue doesn't make sense. CDI **is** the SPI, but Spring choosed to support only `javax.inject` part of it, not the `javax.enterprise.inject.spi` part of it. – BalusC Sep 24 '18 at 12:49
  • Thanks Balus for the answer. It has helped avoiding digging into further details around this subject. – Alisson Godoi Oct 01 '18 at 04:07
  • The actual property-key is `jsf.enable-websocket-endpoint` – larsgrefer Oct 16 '18 at 23:22
  • 1
    @BalusC I was about to ask this question before i stumble on this question. Please is there any alternative for us to implement end-to-end implementation with WebSockets since we are using Joinfaces for our application. I really need a solution – Christian Ibanibo Feb 14 '19 at 16:43

0 Answers0