Re: LISTEN/NOTIFY support in JDBC driver?

From: Barry Lind <barry(at)xythos(dot)com>
To: Benjamin(dot)Feinstein(at)guardent(dot)com
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: LISTEN/NOTIFY support in JDBC driver?
Date: 2002-01-10 03:09:46
Message-ID: 3C3D05FA.9030105@xythos.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

The jdbc driver does support notifications, but in a rather strange way.
When the driver receives a notification is takes the notification
message and adds it to the list of warnings on the connection. So the
way you get notifications is to call getWarnings(). Given that there
isn't a concept like notifications in the jdbc API, this is perhaps the
best way these can be handled within jdbc, unless someone can suggest a
better approach.

thanks,
--Barry

Benjamin(dot)Feinstein(at)guardent(dot)com wrote:

> Hello ya'll,
>
> It appears that the current version of the JDBC interface for PostgreSQL
> does not implement asyncronous client notifications. I have been able to
> issue a NOTIFY statement through the JDBC driver, but I haven't found how to
> LISTEN for an client notification. Am I missing something, or does the
> JDBC-PgSQL interface not support LISTEN? Does anyone know of a patch to the
> JDBC-PgSQL interface that enables the LISTEN functionality? I've looked back
> through the list archives but was unable to find any threads in this topic.
>
> I'm running:
> PostgreSQL 7.1.3
> jdbc7.1-1.2.jar
> Sun JDK 1.3.1_01
>
> Thanks for any help,
> Ben
>
>
>>Ben Feinstein
>> Software Development Engineer, R & D
>> W: 678.585.7865 x6726 F: 770.645.8311 M: 678.772.4126
>> 8302 Dunwoody Pl., Suite 320, Atlanta, GA 30350 www.guardent.com
>>_____________________________________________________
>>G U A R D E N T
>> Enterprise Security and Privacy Programs
>>
>>
>>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
>
>

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Ed Yu 2002-01-10 04:00:21 Statement.java patch (Postgresql 7.1.3)
Previous Message Barry Lind 2002-01-10 03:01:33 Re: PostgreSQL JDBC and WebLogic