简体   繁体   中英

Getting server logout when running long batch jobs in Seam

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM