Re: JDBC gripe list

Поиск
Список
Период
Сортировка
От Basil Bourque
Тема Re: JDBC gripe list
Дата
Msg-id 09BBB87C-E865-4E87-82EE-0C1F739D2BB0@me.com
обсуждение исходный текст
Ответ на Re: JDBC gripe list  ("MauMau" <maumau307@gmail.com>)
Ответы Re: JDBC gripe list  (Oliver Jowett <oliver@opencloud.com>)
Список pgsql-jdbc
Another gripe: "InValid" method

"IsValid" method in JDBC spec is not functional (simply throws an exception).
http://download.oracle.com/javase/6/docs/api/java/sql/Connection.html#isValid(int)

This means users have to write their own routine to test if the connection is still successfully running. Example, run
aquery like "SELECT 1 = 1;" where you ignore the results -- you just look to see if errors occurred. 

Spec:
-----
Returns true if the connection has not been closed and is still valid. The driver shall submit a query on the
connectionor use some other mechanism that positively verifies the connection is still valid when this method is
called.
-----

Current code in "AbstractJdbc4Connection.java" of "postgresql-jdbc-9.0-801.src":
-----
    public boolean isValid(int timeout) throws SQLException
    {
        checkClosed();
        throw org.postgresql.Driver.notImplemented(this.getClass(), "isValid(int)");
    }
-----

--Basil Bourque



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

Предыдущее
От: "David Patricola"
Дата:
Сообщение: SSL connection failure
Следующее
От: Dave Cramer
Дата:
Сообщение: Re: SSL connection failure