Tomcat7.0.52 - WebSocket - request handler threads keeps growing on opening new websocket connections - request handler threads remain alive forever
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   noghan
Posted On:   Saturday, August 23, 2014 04:48 AM

client side: I am using angular js and it is observerd that due to scope changes on different screen changes websocket goes into closing state. So websocket's close method is never called. server side: java code: @ServerEndpoint("/test/") public class TestWebSocket { @OnMessage     public void handleMessage(String message, Session session)             throws IOException, InterruptedException {              }     @OnOpen     public void onOpen(Session session) {          More>>

client side:
I am using angular js and it is observerd that due to scope changes on different screen changes websocket goes into closing state.
So websocket's close method is never called.

server side:

java code:
@ServerEndpoint("/test/")
public class TestWebSocket {

@OnMessage
    public void handleMessage(String message, Session session)
            throws IOException, InterruptedException {
        
    }

    @OnOpen
    public void onOpen(Session session) {
       
    }

    @OnError
    public void onError(Throwable t) {
       
    }

    @OnClose
    public void onClose(Session session) {
   
    }
}


above class's on close method is never called and tomcat's request handler threads remain alive forever and keeps growing on subsequent requests.

Is there anyway to normally close web socket connection from browser using java script or stop tomcat request handler threads from growing?
   <<Less
About | Sitemap | Contact