db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel John Debrunner <...@debrunners.com>
Subject Re: [jira] Updated: (DERBY-31) Statement.setQueryTimeout() support.
Date Tue, 08 Mar 2005 20:34:40 GMT
Shreyas Kaushik wrote:

> ~ I looked at the possible usage of java.util.Timer and
> java.util.TimerTask.
>  Although it may seem to be a correct approach to use them at the first
>  thought it has some practical drwbacks to its usage in this scneario.
>                                                                                     
                                      


> ~ Using the Timer and TimerTask may have just one thread, but the above
> mentioned drawback could be a major performance hit causing more latency in
> statement execution.

Or you work within the Timer scheme, and implement TimerTasks as
recommended, from java.util.Timer

"Timer tasks should complete quickly."

The timer task should just be notifying the thread that is executing the
statement that it needs to be cancelled, not performing the cancel itself.

Dan.



Mime
View raw message