Re: Detecting 'socket errors' - closing the Connection object

Поиск
Список
Период
Сортировка
От Fernando Nasser
Тема Re: Detecting 'socket errors' - closing the Connection object
Дата
Msg-id 3F1D6F79.9040402@redhat.com
обсуждение исходный текст
Ответ на Fix for receiving empty query errors.  (Kim Ho <kho@redhat.com>)
Список pgsql-jdbc
David Wall wrote:
>
> Again, I'm okay with closing it myself if there were an obvious way to
> detect that a given SQLException was in fact related to an unrecoverable I/O
> error.  It's just that simple.
>

When we get the SQLSTATE patch in you'll be able to do:

if ((e.getSQLState() != null) && (e.getSQLState().equals("08S01")))
    throw new ExplainException("Communication link error: " + e.getMessage());



--
Fernando Nasser
Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9


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

Предыдущее
От: pginfo
Дата:
Сообщение: Re: jdbc batch performance problem
Следующее
От: "David Wall"
Дата:
Сообщение: Re: Detecting 'socket errors' - closing the Connection object