How to generate custom JSESSIONID, based on some hash of user's data in order to replicate session

Illarion Kovalchuk picture Illarion Kovalchuk · May 14, 2010 · Viewed 7.7k times · Source

Is it possible to override Tomcat's embedded generator of JSESSIONID, to be able to create custom values of this cookie, based on user's login?

Why do I need this: I have a load balancer with "sticky sessions", configured to route requests with the same JSESSIONID to the same server, and I want to prevent situation, when same user can start two different sessions on different servers.

P.S: all this is about Amazon EC2

Answer

Bozho picture Bozho · May 14, 2010