I've created a simple project with tomcat 8 websockets. here is a snippet:
public void onMessage(String message, Session session)
throws IOException, InterruptedException {
// Print the client message for testing purposes
System.out.println("Received: " + message);
// Send the first message to the client
session.getBasicRemote().sendText("This is the first server message");
As you can see , the websocket make use with the object Session (javax.websocket.session) My problem is, when i enter the tomcat's manager app i cant see any session on the monitor. I believe because it looks for httpSession and not websocket sesssion.
So 2 questions:
1) Is there a way to monitor these websocket sessions on the tomcat instance?
2) Is there a way like sesssion replication (httpSession) for websocket session as well?
thanks!