3

I want to create a JEE6 application that uses websockets. Is there any library I can use to do so that allows me to use application server's port instead of opening a new port? (Which is out of JEE6 specification as far as I know)

Thanks a lot in advance.

Rafa de Castro
  • 2,474
  • 1
  • 24
  • 44

2 Answers2

3

There is JSR-356, more information is here that support WebSockets on java EE7.

I made attempt to use reference implementation Tyrus on Java EE6 but without success. JSR-365 depend on Servlet 3.1 which is a part of Java EE7. Here is an answer from Tyrus developer.

This means that it is only possible to use JSR-365 on EE7 compatible application servers or servers that supports Servlet 3.1 with the help of Tyrus.

Also I checked popular Atmosphere framework. Probably it would be interesting to look at their compatibility page.

Community
  • 1
  • 1
Pavel Polushkin
  • 358
  • 2
  • 8
2

I don't think that most of the JEE6 application servers/servlet containers support websockets in a standard way. But you can actually try to use container-specific functionality. For example Jetty and Glassfish support websockets in their container-specific way. Here are the links:

  1. Jetty
  2. Glassfish

There is also jwebsocket which I suppose can be embedded into the Tomcat.

szhem
  • 4,672
  • 2
  • 18
  • 30