Re: Problem
От | Oliver Jowett |
---|---|
Тема | Re: Problem |
Дата | |
Msg-id | 49D1D4E6.8000709@opencloud.com обсуждение исходный текст |
Ответ на | Re: Problem ("Albe Laurenz" <laurenz.albe@wien.gv.at>) |
Список | pgsql-jdbc |
Albe Laurenz wrote: > Mauricio Solis wrote: >> I have a problem wiht de driver. >> >> If the IP address of the postgresql server is wrong, then the aplication >> take a lot of time in finish, iven I try to set >> DriverManager.setLoginTimeout(3), but the problem still. >> >> I used a sniffer (tcpdump) and I realiced that my java aplication insist >> in try to connect to the wrong IP. How I can finish the aplication when >> the IP server is wrong ??? > > I don't think that you run into the login timeout here, you rather encounter > a TCP timeout. Before JDBC can connect, a TCP connection must be established. > Since the destination IP address does not exist, your computer is sending > SYN requests that do not receive an answer until the TCP layer "gives up". Yes, but if you set a login timeout the driver will do the connect in a separate thread, so while that thread is indeed blocked waiting for a TCP-level timeout, the main application thread should not remain blocked. Mauricio, do you have a testcase that shows the problem? -O
В списке pgsql-jdbc по дате отправления: