Websocket support on JBoss 6 - websocket

I have been exploring options to provide websocket support on JBoss 6. WebSocket was added in Java EE 7 so JBoss 6 doesn't have native support for it.
I explored other options to get websocket support on JBoss 6. One of the commonly suggested approaches is to use Atmosphere library. But found that Atmosphere on JBoss 6 falls back to long polling (doesn't support websockets). Here is the reference,link. I need websocket support and no alternatives.
My investigation so far suggests that, websockets support requires changes in transport protocol mechanism. So we can't get native support for it on JBoss 6 even by adding external jars/libraries.
Any suggestion/opinion ??

Couldn't find any reference for websocket support on JBoss 6. JBoss supports it from EAP 6.3
So going ahead with HTTP.

Which version of JBoss are you using? 6.2+ works with https://github.com/Atmosphere/atmosphere/wiki/Installing-JBoss-WebSocket-Support

Related

ActiveMQ Artemis client on Java 1.6

I am trying to find a workable recipe to connect to ActiveMQ Artemis from Java 1.6.
Any ideas? Any way to leverage another client and protocol to connect to Artemis?
You could possibly use a legacy HornetQ client that supported JDK 1.6. Artemis has worked to maintain backwards compatibility with HornetQ so it should work OK.
Also, you could use a STOMP client that supports JDK 1.6. STOMP is a very simple protocol so even if you couldn't find one with JDK 1.6 support you could write your own if necessary.

Does JBOSS EAP 6.3 support spring + websocket?

I am trying to implement websocket using JBOSS and I understand for enterprise edition websockets are supported from JBOSS EAP 6.3. I am also trying to integrate websockets with spring. I was wondering, does JBOSS EAP 6.3 supports integration of websockets with spring?
I have followed and configured all the steps mentioned at
http://spring.io/guides/gs/messaging-stomp-websocket/
except that, the application is deployed in JBOSS EAP 6.3. When I execute and try to connect, I am hitting with the following error.
GET http://localhost:8080/hello/info 404 (Not Found)
sockjs-0.3.4.min.js:27 u._startsockjs-0.3.4.min.js:27 (anonymous function)
stomp.js:134 Whoops! Lost connection to undefined
the Atmosphere Framework supports JBoss 6.3. Just take a look at this:
https://github.com/Atmosphere/atmosphere/wiki/Installing-JBoss-WebSocket-Support
Just jump on our mailing list for more information.
-- Jeanfrancois

SPDY and Tomcat 8

Tomcat 8 provides experimental support for SPDY protocol, according to these sources: Tomcat's Wiki, API docs, version 8.0.0 changelog.
I understand it's still work in progress but I'd like to try it out. Unfortunately there's very little documentation on the subject.
So has anyone used SPDY with Tomcat? Can you explain how to enable it or share needed configuration?
I was very successful in configuring NGINX with SPDY, and it's super fast. You could always use NGINX and proxy requests to Tomcat. Also, Jetty seems to have some great support for SPDY and SPDY Push features if you need native Servlet containers. As of today, nginx does not support SPDY push "Current implementation of SPDY protocol does not support “server push”.".
http://www.chromium.org/spdy
http://wiki.eclipse.org/Jetty/Feature/SPDY

Using WebSphere with CometD

Does anyone know if its possible to re-configure CometD to use the WebSphere Application Server instead of using Jetty? If so, is there much effort involved in porting it over if I've already got CometD running with Jetty?
CometD runs in any Servlet 2.5 or later Servlet Container, see here.
You did not specify the WebSphere version, but I assume it's a recent enough one.
The only CometD feature that will not work in WebSphere is the WebSocket transport, which is Jetty specific due to lack of standard WebSocket API (now filled by JSR 356 and supported soon in CometD 3).
Your CometD application should deploy and run with no changes in WebSphere, unless you tied yourself explicitly to Jetty APIs.

Long polling and other fallback support for Websocket using Jetty 9

Can somebody please let me know how i can add long polling and other fallback support for websocket using Jetty 9?
I generally recommend using something like CometD (http://www.cometd.org) which will be releasing version 3 fairly soon which will support Jetty 9. Another option would be to look at the Atmosphere project.
Using a messaging framework like these let you have the framework handle finding the best protocol to use, be it SPDY, Websocket, HTTP/1.1 or even polling HTTP/1.0....and they isolate you from future protocols like HTTP/2 which is coming (slowly) which is based on spdy. Using CometD once that protocol lands and becomes available get it for free, no changes needed in your app.

Resources