2013-11-24 3 views
1

tomcat 8 웹 소켓으로 간단한 프로젝트를 만들었습니다. 당신이 볼 수 있듯이 내가 바람둥이의 관리자 응용 프로그램을 입력 할 때, 객체 세션 (javax.websocket.session) 내 문제는,와 웹 소켓 메이크업의 사용은 내가 어떤 세션에 볼 수 없습니다Tomcat 8 - 웹 소켓 세션 및 복제

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"); 

: 여기에 조각입니다 모니터. httpSession이 아닌 websocket sesssion을 찾기 때문에 나는 믿습니다.

그래서이 질문 :

1) 톰캣 인스턴스에서 이러한 웹 소켓 세션을 모니터링하는 방법이 있나요?

2) websocket 세션에도 sesssion replication (httpSession)과 같은 방법이 있습니까?

감사합니다.

답변

0

흥미로운 점은 WebSocket 활동에 따라 HttpSession을 업데이트하는 방법이있는 것 같습니다. 보기 Discussion about WebSocket SPEC 175

Spring-Session을 사용해 볼 수 있습니다. HttpSession 통합을 기반으로 세션 복제와 WebSocket 세션을 처리 할 수 ​​있습니다.

관련 문제