Re: [HACKERS] Java LISTEN/NOTIFY client library work-around

Поиск
Список
Период
Сортировка
От Kris Jurka
Тема Re: [HACKERS] Java LISTEN/NOTIFY client library work-around
Дата
Msg-id alpine.BSO.2.00.1111301949410.22157@leary.csoft.net
обсуждение исходный текст
Ответы Re: [HACKERS] Java LISTEN/NOTIFY client library work-around  (Joel Jacobson <joel@trustly.com>)
Список pgsql-jdbc

On Wed, 30 Nov 2011, Joel Jacobson wrote:

> As you know, LISTEN/NOTIFY is broken in the Java client library. You have to
> do a SELECT 1 in a while-loop to receive the notifications.
>
> http://jdbc.postgresql.org/documentation/head/listennotify.html

This documentation is out of date.  Currently you can get notifications
without polling the database if you are not using a SSL connection.  You
still must poll the driver, using PGConnection.getNotifications, but it
will return new notifications received without an intermediate database
query.  This doesn't work over SSL and potentially some other connection
types because it uses InputStream.available that not all
implementations support.

Kris Jurka

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

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: Bug when retrieving money datatype.
Следующее
От: bht@actrix.gen.nz
Дата:
Сообщение: Re: Bug: Cannot pass null in Parameter in Query for ISNULL