Re: [INTERFACES] JDBC ResultSet Serializable ???

From: Peter T Mount <peter(at)retep(dot)org(dot)uk>
To: Markus Schlup <mcschlup(at)stud(dot)ee(dot)ethz(dot)ch>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: [INTERFACES] JDBC ResultSet Serializable ???
Date: 1998-09-01 17:07:39
Message-ID: Pine.LNX.3.96.980901175936.493m-100000@maidast.retep.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

On Tue, 1 Sep 1998, Markus Schlup wrote:

> Hi there
>
> I'm working on a project which accesses postgreSQL through JDBC. There
> is a servlet which does the JDBC stuff and an applet that should display
> results.
> My idea was that the servlet returns the result set object back to the
> applet which then processes the data. But because the ResultSet class
> (or better the interface for it) is not serializable I can't send it
> back to the applet.

ResultSet is infact an Interface, which can't be serialized because they
cannot be instanciated.

> I'm wondering if it is possible to write some sort of wrapper around it
> which is serializable

Not directly, as only the wrapper will be serialized. Any classes
contained in the wrapper that are not Serializable, won't be.

This affects RMI as well, which extends Serialization.

> or if i have to write a new class which takes the results in the servlet
> and then is sent back to the applet.

This is the only way to do it using standard JDBC.

One of the new feaures in 6.4 does allow a JDBC Object to be serialized
directly into a postgresql table(s) - rather than as a large object. So a
possible option for you when 6.4 is released could be to use this (nb:
it's a little buggy at the moment, so don't use the beta JDBC driver yet).

> Any ideas, hints ?
>
> Thanks for help,
> Markus
>
>

--
Peter T Mount peter(at)retep(dot)org(dot)uk
Main Homepage: http://www.retep.org.uk
PostgreSQL JDBC Faq: http://www.retep.org.uk/postgres
Java PDF Generator: http://www.retep.org.uk/pdf

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message JohnDz 1998-09-01 17:15:56 Re: [INTERFACES] pgsql.tcl: Bug concerning joins
Previous Message Sebastian Meyer 1998-09-01 16:39:04 pgsql.tcl: Bug concerning joins