Subject Re: [Firebird-Java] Re: Events
Author Jim Starkey
Gabriel Reid wrote:

> On 10/6/05, Roman Rokytskyy <rrokytskyy@...> wrote:
> > > I never tried it, but postgre has some kind of event mechanism:
> > > http://www.postgresql.org/docs/7.4/interactive/sql-listen.html
> > > http://www.postgresql.org/docs/7.4/interactive/sql-notify.html
> >
> > Sounds very similar to IB events. We have to check whether it is
> available
> > via JDBC, so that our API is more or less coherent with that one.
> >
>
> Based on the JDBC driver documentation
> (http://jdbc.postgresql.org/documentation/80/listennotify.html),
> <http://jdbc.postgresql.org/documentation/80/listennotify.html%29,> it
> looks like this is performed based on an extension of
> java.sql.Connection. It also looks like it's a bit clumsy and not
> really asynchronous; the connection still has to be polled for
> notifications by first running a (dummy) sql statement. Looking at the
> implementation, it appears that the notification data comes in on the
> same socket connection as is used for all other traffic; in
> Interbase/Firebird/Jaybird, the event notifications come in on a
> dedicated event connection.
>
How the protocol manages events is irrelevent. Events should be
delivered by a dedicated thread to a method in a thread delivery interface.

--

Jim Starkey
Netfrastructure, Inc.
978 526-1376