From: | Barry Lind <barry(at)xythos(dot)com> |
---|---|
To: | Rene Pijlman <rene(at)lab(dot)applinet(dot)nl> |
Cc: | Ned Wolpert <wolpert(at)yahoo(dot)com>, pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: JDBC 3.0 / JDK 1.4 build issues |
Date: | 2001-12-11 05:18:27 |
Message-ID: | 3C159723.3030606@xythos.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Rene,
I think you have the right idea here. I might suggest that you have an
abstract Connection3 to make things consistent. The only hard part is
to make sure that right classes get built for each driver version.
thanks,
--Barry
Rene Pijlman wrote:
> On Sun, 9 Dec 2001 07:14:01 -0800 (PST), you wrote:
>
>>Oh yeah. That's right. Since org.postgresql.jdbc2.Connection is a
>>'complete' implementation of java.sql.Conenction, it cannot compile
>>cleanly with jdk1.4. So, one cannot inherit from the jdbc2.Connection
>>object. It has to be a clean jdbc3 Connection. Ugh.
>>
>
> And how about this code reorganization scheme?
>
> org/postgresql/Connection.java
> package org.postgresql;
> public abstract class Connection
> // Contains code that is common to jdbc1, jdbc2 and jdbc3
>
> org/postgresql/Connection2.java
> package org.postgresql;
> public abstract class Connection2
> extends org.postgresql.Connection
> // Contains code that is common to jdbc2 and jdbc3,
> // but cannot compile with jdbc1
>
> org/postgresql/jdbc1/Connection.java
> package org.postgresql.jdbc1;
> public class Connection
> extends org.postgresql.Connection
> implements java.sql.Connection
> // ant: only compiled when JDBC1
> // Contains code that is valid only for jdbc1
>
> org/postgresql/jdbc2/Connection.java
> package org.postgresql.jdbc2;
> public class Connection
> extends org.postgresql.Connection2
> implements java.sql.Connection
> // ant: only compiled when JDBC2
> // Contains code that is valid only for jdbc2
>
> org/postgresql/jdbc3/Connection.java
> package org.postgresql.jdbc3;
> public class Connection
> extends org.postgresql.Connection2
> implements java.sql.Connection
> // ant: only compiled when JDBC3
> // Contains code that is valid only for jdbc3
>
> Perhaps Connection2.java should go in the jdbc2 package.
>
> I'll see if I can get this to work with 1.3/1.4.
>
>
>>(And in both cases, we still have the ant vs. make discussion
>>to solve) thoughts? Ideas on how can simplify this so jdbc4 doesn't
>>do this to us again? (Or is this accecptable/normal situation?)
>>
>
> Another interesting idea is to build all versions of the driver
> into one .jar file and choose the right classes at runtime
> (using reflection in JDK >= 1.1). This would reduce the number
> of driver versions we have to distribute and would make
> deployment easier. Building the driver this way would be more
> complicated though, since it requires all JDK versions to be
> available on the build platform. Just a thought :-)
>
> Regards,
> René Pijlman <rene(at)lab(dot)applinet(dot)nl>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Antonio Fiol Bonnín | 2001-12-11 07:44:14 | Re: Update for bug in org.postgresql.Connection method |
Previous Message | Barry Lind | 2001-12-11 05:12:42 | Re: (2) patch against cvs for getTimestamp() problem. |