Re: Adding JDK1.5 removing 1.1 support. - Mailing list pgsql-jdbc

From Oliver Jowett
Subject Re: Adding JDK1.5 removing 1.1 support.
Date
Msg-id 40F7B2FA.8070508@opencloud.com
Whole thread Raw
In response to Re: Adding JDK1.5 removing 1.1 support.  (Kris Jurka <books@ejurka.com>)
Responses Re: Adding JDK1.5 removing 1.1 support.
List pgsql-jdbc
Kris Jurka wrote:

> The problem is that the 1.5 JDK has changed
> the API for ObjectFactory which means that PGObjectFactory and
> Jdbc3ObjectFactory cannot be compiled at the moment.

Aha, I see. generics strike again.

We could deal with the non-pooling datasources by no longer implementing
Referenceable and relying on serialization to preserve state. Then we do
not need an ObjectFactory at all.

For pooling DataSources (I mean jdbc2.optional.PoolingDataSource, not
jdbc2.optional.ConnectionPool -- those are badly named!) we could
implement readResolve()/writeReplace() to translate to/from a lookup
handle into the registry of known pools when serialized. But that gets a
bit hairy. It's probably simpler to just do conditional compilation of
the signature of PGObjectFactory.getObjectInstance() if we want to
support the pooling DataSources.

I'm actually tempted to drop the pooling DataSource implementations
altogther. Does anyone on the list actually use these? I think the more
common approach is for a higher layer to use our
ConnectionPoolDataSource implementation (or plain DataSource, even) plus
their own pooling logic..

-O

pgsql-jdbc by date:

Previous
From: Kris Jurka
Date:
Subject: Re: Adding JDK1.5 removing 1.1 support.
Next
From: "Stefano Bonnin"
Date:
Subject: Fw: SSL Problem