Bug 54738 - WebSocket messages does not set lastAccessTime to session, and after the session.maxIntervalTimeout() my session is deleted
Summary: WebSocket messages does not set lastAccessTime to session, and after the sess...
Status: RESOLVED INVALID
Alias: None
Product: Tomcat 7
Classification: Unclassified
Component: Servlet & JSP API (show other bugs)
Version: 7.0.37
Hardware: All All
: P2 major (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-21 15:12 UTC by Radu Toader
Modified: 2013-03-21 16:07 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Radu Toader 2013-03-21 15:12:57 UTC
WebSocket messages does not set lastAccessTime to session, and after the session.maxIntervalTimeout() my session is deleted

I have attributes on httpsession, and I check them every time I want to send a message to browser-client through WebSocket.

    If the client is not making any other requests to page like AJAX or open another link, his sessions is deleted along with the attributes on the session.

   I have implemented ping-pong from client to server on WebSocket, I could reset the lastAccessTime of the session there, but the problem is that there is no visibility to session's lastAccessedTime so there is no way you can change it. The framework should do that for you.

I belive that a reset must be added whenever a message is received/send to/from client through WebSocket.
Comment 1 Mark Thomas 2013-03-21 15:18:35 UTC
This should be raised with the WebSocket EG. It is not an implementation issue (it might become one if the spec is changed).
Comment 2 Radu Toader 2013-03-21 15:23:12 UTC
At least there should be a way to setLastAccessed time to a session.
Comment 3 Nick Williams 2013-03-21 16:07:32 UTC
I have created an issue for this on the WebSocket API project JIRA [1]. You will need to login/register on java.net to view and/or watch it for updates. Registration is free.

[1] http://java.net/jira/browse/WEBSOCKET_SPEC-175