Re: JDBC gripe list

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: JDBC gripe list
Дата
Msg-id 4D8F25CE020000250003BCCA@gw.wicourts.gov
обсуждение исходный текст
Ответ на JDBC gripe list  (Dave Cramer <pg@fastcrypt.com>)
Ответы Re: JDBC gripe list  (Radosław Smogura <rsmogura@softperience.eu>)
Список pgsql-jdbc
> 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

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: "Kevin Grittner"
Дата:
Сообщение: Re: idea to have driver return immediately after a query
Следующее
От: Dave Cramer
Дата:
Сообщение: Re: idea to have driver return immediately after a query