Interruptible Database Queries

June 18, 2004

[From ONJava.com]

One typical software design goal is responsiveness, understood as how easy and quick it is for the user to interrupt the current operation. Certain operations -- such as complex database queries; network I/O handling; extensive calculations; sorting of, or searching in, large data sets -- can take seconds or even minutes before they complete. Well-designed software allows the user to cancel such a long operation in progress. In this article I will demonstrate how to cancel a time-consuming database query by simply interrupting the thread in which the query runs. Such an interruptible database query will enable you to develop truly interactive programs that respond promptly even to the most impatient users.

The article continues at http://www.onjava.com/pub/a/onjava/2004/06/16/dbcancel.html