有什么框架用于处理swing应用程序中的数据库请求吗? [英] Are there any frameworks for handling database requests in swing applications?

查看:134
本文介绍了有什么框架用于处理swing应用程序中的数据库请求吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我相信在gui应用程序中处理数据库请求的程序员遇到了以下一些或全部问题:

I believe any programmer who has been dealing with database requests in a gui application has run into some or all of the following problems:


  • 您的GUI冻结,因为您从事件中调用
    数据库层
    分派线程

  • 当您有多个窗口/面板/ jframe,用户可以启动数据库请求您的性能会下降,因为您对用户创建的线程没有任何控制。

  • 用户可能能够锁定应用程序甚至数据库,因为他在第一个动作已完成

我想知道的是:是否有任何框架处理处理有序集的要求

What I'd like to know about: are there any frameworks that handle the requirements of handling an ordered set of long running actions (including but not limited to database calls, i.e. calculations) outside the event dispatch thread?

注意:我知道SwingWorker; - )

Note: I know of SwingWorker ;-)

推荐答案

这样的事情应该在Netbeans中找到。请参阅RequestProcessor。但在更简单的情况下,这不是必需的。上次我需要像线程调度和控制我只是使用新的并发包包括在J5(我使用J6)。使用它的ExecutorFactory,你可以简单地实现对任务的基本控制。您还可以使用一些队列。 此PDF可以帮助。 PDF是用斯洛伐克语书写的,但单/多任务工作者是用Java编写的);

Such a thing should be found in Netbeans for example. See RequestProcessor. But in simpler cases this is not required. Last time I need something like thread scheduling and control I simply used new concurrency packages included in J5 (I used J6). With its ExecutorFactory-ies you can simply achieve basic control over tasks. You can also use some queues. This PDF can help. The PDF is written in Slovak language but the Single/Multiple task workers are there written in Java ;)

这篇关于有什么框架用于处理swing应用程序中的数据库请求吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆