Re: [INTERFACES] JDBC ResultSet Serializable ???

Поиск
Список
Период
Сортировка
От Peter T Mount
Тема Re: [INTERFACES] JDBC ResultSet Serializable ???
Дата
Msg-id Pine.LNX.3.96.980901175936.493m-100000@maidast.retep.org.uk
обсуждение исходный текст
Ответ на JDBC ResultSet Serializable ???  (Markus Schlup <mcschlup@stud.ee.ethz.ch>)
Список 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@retep.org.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


В списке pgsql-interfaces по дате отправления:

Предыдущее
От: James Olin Oden
Дата:
Сообщение: Mac GUI Interfaces
Следующее
От: "Thomas G. Lockhart"
Дата:
Сообщение: Re: [INTERFACES] postodbc on sparc2.5.1