Re: Driver.connect Timeout

Поиск
Список
Период
Сортировка
От Kris Jurka
Тема Re: Driver.connect Timeout
Дата
Msg-id Pine.LNX.4.33.0401121028410.26062-100000@leary.csoft.net
обсуждение исходный текст
Ответ на Driver.connect Timeout  (Darin Ohashi <DOhashi@maplesoft.com>)
Список pgsql-jdbc

On Mon, 12 Jan 2004, Darin Ohashi wrote:

>
> Is there some way to specify a timeout in the Driver.connect url?
>
> MySQL allows one to do the following:
>
> "jdbc:mysql://host/database?socketTimeout=5000"
>
> We are having some stability problems with the machine running the postgresql
> server.  When some of our automated tests attempt to access the database when
> the machine is down, they hang trying to open the connection.
>

This was just recently brought up in this thread:
http://archives.postgresql.org/pgsql-jdbc/2004-01/msg00085.php

It has some mention of a Connection pool, but that is another problem.  I
took a quick look at the mysql source and they use reflection to determine
if a 1.4 jvm is present and use the timeout in that case or throw an
Exception otherwise.

For the question of setSoTimeout they only do so once, but not knowing how
their protocol works it is uncertain if they don't need to perform
multiple reads during connection setup or they are just punting on the
problem.

Kris Jurka


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

Предыдущее
От: Darin Ohashi
Дата:
Сообщение: Driver.connect Timeout
Следующее
От: Per-Olof Noren
Дата:
Сообщение: Warnings during compile of 7.4.1 driver under jdk1.4.2_03 on mandrake