简体   繁体   English

在Seam中运行长时间批处理作业时获取服务器注销

[英]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. 用户从UI中选择年份,然后单击“生成”按钮。

The flat files process usually takes 3 to 4 hours to generate all the files. 平面文件处理通常需要3到4个小时才能生成所有文件。 When the process is running and flat files are being created, the UI shows a modal that the job is being processed. 当流程正在运行并且正在创建平面文件时,UI会显示正在处理作业的模式。

The problem is that after the files are successfully generated, the UI redirects to the login screen. 问题在于,成功生成文件后,UI会重定向到登录屏幕。 Instead I want to refresh the UI showing the message that the process has successfully completed. 相反,我想刷新UI,以显示该过程已成功完成的消息。

I am looking for help on this. 我正在寻求帮助。 Also would increasing the conversation timeout or session timeout in web.xml help fix this issue? 另外,增加web.xml中的会话超时或会话超时是否可以解决此问题?

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 更好的解决方案可能是在更大范围内(例如,应用程序或数据库)存储有关作业的信息,然后,如果用户意外注销,作业将继续运行并完成

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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