Concurrent call to conversation
I'm 开发者_运维百科using Seam and getting a "Concurrent call to conversation" error. What does this mean?
I have a button that takes 5 min to process. I get this error within 2 minutes. Setting the concurrent-request-timeout to 10 min does not seem to work. Is there a way to block all other requests until the first one has completed?
Section 6.9 of the Seam documentation explains strategies for handling concurrent calls in a conversational context.
don't think it's great idea to block all other request for SUCH long operation, much better approach is to have it to run asynchronously.
You can take a look here http://achorniy.wordpress.com/2009/07/14/avoid-concurrent-call-to-conversation/ but this is the solution to allow you to block other requests during the short period of time (of course it can block them for a long time but that's not good approach in general to make user to wait for such requests) You can take a look here for a good example of how UI can be organized to work with async on backend (see richfaces livedemo "Ajax Support" Push/Pull examples)
Here is the solution - use richfaces progressBar, call the seam asynchronous method to run long-process and pass the ProgressBean with parameters to async-method(it should be accessible from yuor conversation bean which you use in JSF) and periodically update progress-status in long-running task This approach is explained in details here [Show dynamic process progress in Seam/Richfaces][1]
[1] http://achorniy.wordpress.com/2010/10/22/show-dynamic-process-progress-in-seam-richfaces/
精彩评论