By default, the WebSocket protocol used by Java EE 7 has version 13. Through this method, we can verify the used version protocol:
String version = session.getProtocolVersion();
This method searches for the parameter Sec-WebSocket-Version inside the HTTP headers.
To verify that the session is open, a simple API can be used:
boolean open = session.isOpen();