myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Kitching <>
Subject Handling multiple concurrent submits
Date Wed, 09 Nov 2005 02:30:45 GMT

I've noticed that if I click multiple times on a component that does a 
submit then quite often I get an exception generated in the server.

The most obvious case for me is a table with a sortable header; if I 
pretend to be impatient and click several times on the sort header then 
usually I end up with an exception page.

I believe the cause is that the browser has submitted several concurrent 
post requests to the server; multiple threads within the server then try 
to run the view at the same time, and as view components are not 
threadsafe all sorts of nasty side-effects occur. An example of a 
non-threadsafe component is a UIData with session scope; it's got only 
one rowIndex, so multiple threads trying to iterate over the rows in the 
table is bound to result in something unpleasant.

How do people handle this? I can't force my users to go on a training 
course about waiting for a page to complete before clicking again. And I 
can't live with exception pages being rendered to them if they click too 



View raw message