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

Поиск
Список
Период
Сортировка
От Dmitry Tkach
Тема Re: Detecting 'socket errors' - closing the Connection object
Дата
Msg-id 3F1D47B4.5030804@openratings.com
обсуждение исходный текст
Ответ на Re: Detecting 'socket errors' - closing the Connection object  (Oliver Jowett <oliver@opencloud.com>)
Ответы Re: Detecting 'socket errors' - closing the Connection object  (Oliver Jowett <oliver@opencloud.com>)
Список pgsql-jdbc
>
>
>Unfortunately the isClosed() javadoc is fairly explicit in saying you can't
>use it for this:
>
>  Retrieves whether this Connection object has been closed. A connection is
>  closed if the method close  has been called on it or if certain fatal errors
>  have occurred.
>
Hmmm.... To me this phrase sounds like exactly what he was asking for...
Perhaps, it would then make sense to make isClosed() return false if the
socket goes south...
I think that situation very well qualifies as a 'certain fatal error'
after all...

>This method is guaranteed to return true only when it is
>  called after the method Connection.close has been called.
>
>
This is weird.... direct contradiction with the previous sentense isn't
it? :-)

Dima


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

Предыдущее
От: Felipe Schnack
Дата:
Сообщение: Re: patch: tiny patch to correct stringbuffer size estimate
Следующее
От: Oliver Jowett
Дата:
Сообщение: Re: Detecting 'socket errors' - closing the Connection object