I wrote an asynchronous servlet to feed changes in a cached object to all clients who have sent a request to the servlet.
With the request a client can get a subsection of the cache by including different parameters.
I am simply storing the requests in an ArrayList and iterating through them whenever a change occurs to send the responses back to the client.
Everything is working well, except now I have a requirement to handle a situation where a client will send a second request with possibly different parameters.
I would like to replace the old request I have stored with this new one when that happens. But to do that I need to know if the request came from the same user. Is there a way to test if the request came from the same user with Servlets 3.0?