DriverManager.setLoginTimeout question - Mailing list pgsql-jdbc

From kangch
Subject DriverManager.setLoginTimeout question
Date
Msg-id 006c01c2ff26$b00cbc60$6101a8c0@jn07
Whole thread Raw
List pgsql-jdbc
Hi,
 
According to JDBC API, DriverManager.setLoginTimeout methos is
Sets the maximum time in seconds that a driver will wait while attempting to connect to a database
 
I am testing this method "setLoginTimeout(3) -> 3 seconds"
 
Class.forName("org.postgresql.Driver");
DriverManager.setLoginTimeout(3);
conn = DriverManager.getConnection(
                                        "jdbc:postgresql://test:5432/test1",
                                        "test2",
                                        "test3");
but, it's not working...
It takes about 2 minutes or 3 minutes, if the postgreSQL is not exist
I want to know that setLoginTimeout is work or not work in postgreSQL.
 
If you know another method, please answer to me the solution...
I want to receive more quickly to the postgreSQL, if postgreSQL is not exist.
 
Cheers
 
Kang
 

pgsql-jdbc by date:

Previous
From: .
Date:
Subject: "text" type is java.sql.Types.varchar not longvarchar
Next
From: "Jason Dinger"
Date:
Subject: tomcat/postgres problem