I've read many different techniques to stopping double submits, but one 
technique unfamiliar to me was described inside the Spring Framework.

http://www.springframework.org/docs/api/org/springframework/web/util/HttpSessionMutexListener.html

It did not occur to me to lock the session to make sure that, within a user's 
dialog with the server, only one request from a session makes it through. Now 
read that carefully: not one user, but one request from one user. So 1000 
different threads can be running, but locking the session will ensure each is 
from a unique session.

However, this class exists because some application servers do not guarantee 
that the same HttpSession object instance is re-used between requests. But the 
application server does need to guarantee the same object instance with the 
session... So Spring provides this class (nothing but a marker interface) if 
you want to head down this road.

What do people think of locking the session via a session object? I like it, 
but I haven't implemented it -- but I want to use it if the feedback is good. I 
have a few places in my application in which I want to make sure the user 
progresses through my cattle chute in an orderly fashion.

Paul

                
---------------------------------
Do you Yahoo!?
 Everyone is raving about the  all-new Yahoo! Mail Beta.

Reply via email to