> Dave Cramer wrote:
>
> Adding to the list is statement timeout. I seem to recall the issue
> is we do not want to spawn a thread for each statement which seems
> to be the only way to do this. Alternatively we could use timers,
> but I presume they just spawn threads as well.
No, see the java.util.Timer docs:
http://download.oracle.com/javase/6/docs/api/java/util/Timer.html
Each Timer object uses one thread and can handle thousands of pending
timers. If you're using JDBC you're on a JVM, and those all know how
to multi-thread gracefully. A daemon thread for a group of timers
should be no big deal.
We had a patch submitted for this, which looked to me like it was
pretty close to committable. I raised some concerns and was
intending to look at it again, but haven't gotten the requisite round
tuits yet.
-Kevin