Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[servlet-dev] WebSocket and HttpSession

Hi all,

I'd like to see if we can find a way to resolve a long standing WebSocket issue. The full detail can be found in this issue:
https://github.com/jakartaee/websocket/issues/175

The short version is that a WebSocket session that retains a reference to the Servlet HttpSession in place when the WebSocket handshake took place needs a way to indicate that it is using the session and that the session should not be invalidated for inactivity.

My proposal is to add the following method to HttpSession:

public void access()


Calling this method would update the last accessed time to the current time.

The circumstances in which a WebSocket application may call this method would be left as an application concern as different applications are likely to want to adopt different strategies.

Thoughts?

Mark


Back to the top