Skip site navigation (1) Skip section navigation (2)

Re: Java LISTEN/NOTIFY client library work-around

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Joel Jacobson <joel(at)trustly(dot)com>
Cc: Kris Jurka <books(at)ejurka(dot)com>, pgsql-hackers(at)postgresql(dot)org, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Java LISTEN/NOTIFY client library work-around
Date: 2011-12-02 16:16:17
Message-ID: CAHyXU0yi9qTTvw32jE9G=+Hzt9VD5zs-21ny78dn6Kc5sL4wTw@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-jdbc
On Thu, Dec 1, 2011 at 6:21 AM, Joel Jacobson <joel(at)trustly(dot)com> wrote:
> 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.

I certainly don't want to discourage you from cleaning up the jdbc ssl
situation, but one workaround might be to use stunnel.

merlin

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2011-12-02 16:55:12
Subject: Re: WIP: Join push-down for foreign tables
Previous:From: Yeb HavingaDate: 2011-12-02 16:11:47
Subject: Re: patch for type privileges

pgsql-jdbc by date

Next:From: Walter HurryDate: 2011-12-04 16:40:47
Subject: JDBC with SSL
Previous:From: Tom LaneDate: 2011-12-02 00:21:41
Subject: Re: Bug: Cannot pass null in Parameter in Query for ISNULL

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group