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.