Constant "JTable" update - Mailing list pgsql-jdbc

From Jean-Christophe ARNU
Subject Constant "JTable" update
Date
Msg-id 1005255525.2065.38.camel@ez
Whole thread Raw
List pgsql-jdbc
Hello to all the pgJDBC communauty!

    My problem seems to be quite simple to solve, but I would like to get
you opinion on the different solutions available for the result to be
programmed as nicer as it can :

    My PostgreSQL database is used as a data storage for measure. On
process "feeds" the database, inserting measure in a table (measure). On
the other hand, I have a java program which is used to display such
results in tables (or charts). Up to there, nothing seems to be easier.
But I have to display data in "real time". The java program has to be
notified that a new measure (or data content in the measure table) was
inserted (repectively has changed).

    The straightforward solution seems to have database listeners on the
table that wakes-up a notifier in the java program. But such kind of
mechanism seems not to be implemented in the JDBC API (up to my small
knowledge).
    The second tortuous solutions (the one I use) is to query the database
relatively often to get the freshest results. This is quite bandwidth
consumming (assuming that some users should use a quite small bandwidth
connection). Using this kind of solution makes the Java application
slow...

    My questions are : is there any other solutions (Use of cursor maybe)?
is the first solution can be implemented while combining JDBC et
PostgreSQL functionnalities?

    Thank you for any remarks/answers/attention paid for these problems.
--
Jean-Christophe ARNU
s/w developer
Paratronic France


pgsql-jdbc by date:

Previous
From: Barry Lind
Date:
Subject: Re: ResultSet.getDate failure with timestamp column
Next
From: "Shevland, Joseph (AU - Hobart)"
Date:
Subject: Re: JDBC Driver