agora inbox for pljava-dev@postgresql.org
help / color / mirror / Atom feedSubject: [Pljava-dev] Notify/Listen
Date: Sun, 13 Aug 2006 14:13:48 +0200
Message-ID: <1155471228.5894.8.camel@panoramix> (raw)
In-Reply-To: <75F39425D1954A4380D5C9E1D630CDC903C30CB4@C2A007.stratford.auto.cooperintra.ctb>
References: <75F39425D1954A4380D5C9E1D630CDC903C30CB4@C2A007.stratford.auto.cooperintra.ctb>
Hi John,
On Wed, 2006-08-09 at 12:08 -0400, Burtenshaw, John J. wrote:
>
> Has anyone ever used the Notify/Listen mechanism in pljava? How would
> you implement a client program that would do an sql Listen?
> Apparently according to the Postgresql docs there are functions that
> need to be called periodically to see if an event has occured or not
> (i.e. PQnotifies in libpq)
I do use notify/listen extensively thought not in pljava but in JBoss
using a MBean as a listener, which is polling in a separate thread. The
notify is done in a psql trigger. If you want I can send you the MBean
with the code, although it is very similar to the jdbc example here:
http://jdbc.postgresql.org/documentation/81/listennotify.html#listen-notify-example
--
Groeten,
Joost Kraaijeveld
Askesis B.V.
Molukkenstraat 14
6524NB Nijmegen
tel: 024-3888063 / 06-51855277
fax: 024-3608416
web: www.askesis.nl
view thread (3+ messages) latest in thread
Message-ID: <1155471228.5894.8.camel@panoramix>
Permalink: ../1155471228.5894.8.camel@panoramix/
Also on: postgresql.org/message-id/1155471228.5894.8.camel@panoramix
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pljava-dev@postgresql.org
Subject: Re: [Pljava-dev] Notify/Listen
In-Reply-To: <1155471228.5894.8.camel@panoramix>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox