Getting server logout when running long batch jobs in Seam

100 Views Asked by At

One of the requirements I have is to generate flat files in a specific format. The user selects the year from the UI and clicks the generate button.

The flat files process usually takes 3 to 4 hours to generate all the files. When the process is running and flat files are being created, the UI shows a modal that the job is being processed.

The problem is that after the files are successfully generated, the UI redirects to the login screen. Instead I want to refresh the UI showing the message that the process has successfully completed.

I am looking for help on this. Also would increasing the conversation timeout or session timeout in web.xml help fix this issue?

1

There are 1 best solutions below

0
DaveB On

yes you could increase both session timeout and conversation timeout (if doing work in conversation scope) so they exceed the duration of the job

a better solution may be to store information on the jobs in a higher scope (eg. application or to the database), then if the user accidently logs out the job will continue running and complete