views:

437

answers:

3

seam Concurrent call to conversation . what is that about ? I have a button that takes 5 min to process. i get this error within 2. i have set 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 its response ?.

A: 

Section 6.9 of the Seam documentation explains strategies for handling concurrent calls in a conversational context.

Dolph
A: 

Hi, 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)

Andrey Chorniy
A: 

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/

Andrey Chorniy