通过网页执行长存储过程

发布于 2024-11-18 00:42:01 字数 314 浏览 6 评论 0原文

我有一个在 Weblogic 10.3.3 上运行的 Web 应用程序(使用 Struts 1.x),它读取文件并将数据输入到数据库(Oracle 11g DB)。而且通过这个 Web 应用程序,我可以在数据库中运行存储过程。现在的问题是,对存储过程进行一些更改后,需要相当长的时间才能完成执行(25-40 分钟)。

现在将加载运行存储过程的页面,即使存储过程完成后(通过会话浏览器检查),页面仍处于加载状态,有时会显示超时错误。

有没有办法让网页运行需要很长时间(60 分钟)才能完成的存储过程?我应该更改应用程序代码或 Weblogic 设置吗?

感谢您的回复。

I have this web application (using Struts 1.x) running on Weblogic 10.3.3 that read files and input the data to a database (Oracle 11g DB). And also through this web application, I can run a stored procedure in the database. The problem is now after a few changes on the stored procedure, it requires a pretty long time to finish executing (25-40 minutes).

The page to run the stored procedure now will load, and even after the stored procedure has finished (checked through session browser), the page will still in loading state and after sometimes it will display timeout error.

Is there any way for a web page to run a stored procedure that takes long time to finish (60 minutes)? Should I make changes to the application code or the Weblogic setting?

Thanks for the responses.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

酷炫老祖宗 2024-11-25 00:42:01

你永远不应该让用户等待。当我上次处理这个问题时:

  1. 客户端(用户/浏览器)告诉服务器“启动过程”
  2. 服务器生成启动该过程的线程。
  3. 服务器告诉客户端(用户/浏览器)“我现在完成了。稍后再回来。Mabee 我给 yoo 发送电子邮件”
  4. 服务器完成程序。
  5. 服务器通过电子邮件通知用户该过程已完成。
  6. 辅助线程终止。
  7. 服务员吃了罗宾爵士的吟游诗人,大家都很高兴。

You should never ever ever ever leave the user waiting. When I last dealt with that:

  1. Client(user/browser) tells server "Start procedure"
  2. Server spawns thread which starts the procedure.
  3. Server tells Client(user/browser) "I is done now. come back later. Mabee I emails yoo"
  4. Server completes procedure.
  5. Server emails user that procedure is done.
  6. Secondary thread terminates.
  7. Server eats Sir Robin's minstrels and there is much rejoicing.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文