I have a Java EE application that receives requests over http/s. The requests do not contain any cookies or jsessionid request parameters.
In the request payload I can find a string “sessionid” that should allow me to associate that request to an HttpSession. I’ve managed to implement a mechanism that stores a map of sessions in memory, but that’s not (easily) scalable in a cluster environment.
The standard Java EE mechanism for associating requests to HttpSessions is based on cookies or URL rewriting, which are not available for me, since I don’t control the 3-rd party that sends the requests. Also, the HttpServletRequest object does not have a setSession() method.
Is there a straightforward way to associate requests to HttpSessions, without relying on a particular Java EE server or on some distributed cache?
A few statements:
Map<String, Object>for each sessionId and support it yourelf