Re: JDBC 3.0 / JDK 1.4 build issues - Mailing list pgsql-jdbc

From Ned Wolpert
Subject Re: JDBC 3.0 / JDK 1.4 build issues
Date
Msg-id 20011209023237.1714.qmail@web13405.mail.yahoo.com
Whole thread Raw
In response to JDBC 3.0 / JDK 1.4 build issues  ("Rene Pijlman" <rene@lab.applinet.nl>)
List pgsql-jdbc
--- Rene Pijlman <rene@lab.applinet.nl> wrote:
> Unfortunately, when the driver is modified to compile with JDK 1.4, it
> won't compile with JDK 1.3 and older. There are at least two reasons for
> this:
>
> 1) Connection must implement the new method setSavePoint(), which
> returns a
> new type java.sql.Savepoint

Hm.... if we cannot reuse the org.postgresql.Connection abstract class,
then won't we need to have a org.postgresql.jdbc3.Connection class that
extends org.postgresql.jdbc2.Connection?  Then will have to have the
Driver return the jdbc3 Connection when its called.  Won't that work?
(We may not need much more ant-processing since it still called
java.sql.Connection.)  It does seem similiar to jdbc1 -> jdbc2 issues.
(See end of email for more on this...)

> 2) PreparedStatement must implement the new method
> getParameterMetaData(), which returns a new type
> java.sql.ParameterMetaData

Same thing here. Getting a PreparedStatement comming from the jdbc3
Connection would return this.  Also, we'll need a new CallableStatement
since it extends PreparedStatement. Our new callable one needs to
extend the jdbc3 one.

> I think its very undesirable to fork the entire jdbc2 driver, just to be

I agree. I don't think we have to.  But if we compile with jdk1.4, we
cannot compile the jdbc2 or jdbc1 stuff.  That's the only real issue to
me, so far.  Though this is kinda distressing since Sun could have
easilly made a java.sql.jdbc3.Connection internface themselves that
would implement the new method.  This means that our current driver cannot

compile at all in jdk1.4.  Is that correct?  That sucks.

=====
Virtually,        |                   "Must you shout too?"
Ned Wolpert       |                                  -Dante
wolpert@yahoo.com |
_________________/              "Who watches the watchmen?"
4e75                                       -Juvenal, 120 AD

-- Place your commercial here --                      fnord

__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com

pgsql-jdbc by date:

Previous
From: Ned Wolpert
Date:
Subject: Re: JDBC 3.0 / JDK 1.4 build issues
Next
From: Rene Pijlman
Date:
Subject: Re: JDBC 3.0 / JDK 1.4 build issues