Re: Java LISTEN/NOTIFY client library work-around

From: Joel Jacobson <joel(at)trustly(dot)com>
To: Kris Jurka <books(at)ejurka(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Java LISTEN/NOTIFY client library work-around
Date: 2011-12-01 12:21:39
Message-ID: CA+9pJHQd+SL=N_yxicptJHKA7wcAhgFGE_QE5OdCL7WX-NSE2w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-jdbc

2011/12/1 Kris Jurka <books(at)ejurka(dot)com>

>
>
> 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.
>

I know it works without SSL, but we need SSL for this.

If it would be possible to fix it, my company is as I said willing to pay
for the cost of such a patch.

>
> Kris Jurka
>

--
Joel Jacobson
Trustly
+46703603801
https://trustly.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kohei KaiGai 2011-12-01 13:25:21 Re: Refactoring on DROP/ALTER SET SCHEMA/ALTER RENAME TO statement
Previous Message Greg Smith 2011-12-01 11:26:42 Re: Patch to allow users to kill their own queries

Browse pgsql-jdbc by date

  From Date Subject
Next Message Craig Ringer 2011-12-01 13:39:45 Re: Bug: Cannot pass null in Parameter in Query for ISNULL
Previous Message Oliver Jowett 2011-12-01 09:38:04 Re: Bug: Cannot pass null in Parameter in Query for ISNULL