BUG #1065: JDBC DataSource Serializability

From: "PostgreSQL Bugs List" <pgsql-bugs(at)postgresql(dot)org>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #1065: JDBC DataSource Serializability
Date: 2004-01-24 22:27:22
Message-ID: 20040124222722.3C95CCF4B7E@www.postgresql.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 1065
Logged by: R. Lemos

Email address: rslemos(at)nce(dot)ufrj(dot)br

PostgreSQL version: 7.4

Operating system: Linux

Description: JDBC DataSource Serializability

Details:

The JDBC2 pooled datasource(org.postgresql.jdbc2.optional.ConnectionPool),
although implements java.io.Serializable, cannot be correctly serialized.
Its superclass does not implement java.io.Serializable and have important
fields marked as private.

Either should the superclass be Serializable or its fields non-private
(protected, friend or public).

To reproduce the issue just create and setup a ConnectionPool, serialize and
desserialize it (ByteArray*Stream will do). The new object doesn't have the
properties correctly set.

This may apply to other DataSource implementations (JDBC3 and non-pooled).

PS: I could have corrected this and submitted the patch, but I don't know
why are those properties private nor why isn't the superclass Serializable,
so I could not preview the impact those changes would make.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message wilhelm.pakulla 2004-01-25 00:33:18 Should Aggregate Functions always return one row?
Previous Message Robert Creager 2004-01-24 21:25:39 Re: BUG #1061: message type 0x49 arrived from server while