Quote:
I can insert a servlet filter in the request chain, and ensure that only 1 request is processed at a time, but I am wondering if there is a better, more elegant approach.
How do others deal with this?
this the right way to avoid concurrent httrequests.
Be sure to use a long session (storing it in httpSession) only if you really need it. This is called long-session-per-application-transaction pattern. As baliukas said, prefer short session with detached object if you need failover.
Even with long-session-per-application-transaction, you must take care of the session size and no consider it as a second level cache:
it isn't