JDBC 3.0 / JDK 1.4 build issues

Поиск
Список
Период
Сортировка
От Rene Pijlman
Тема JDBC 3.0 / JDK 1.4 build issues
Дата
Msg-id BEELJGLKPCMDGFENPBPNCEJDDNAA.rene@lab.applinet.nl
обсуждение исходный текст
Ответы Re: JDBC 3.0 / JDK 1.4 build issues  (Ned Wolpert <wolpert@yahoo.com>)
Список pgsql-jdbc
I'm working on a patch which enables the driver to compile with JDBC 3.0 /
JDK 1.4 (currently beta-3). Basically we need to add a few methods and throw
"not implemented" in most of them.

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

See:
http://java.sun.com/j2se/1.4/docs/api/java/sql/Connection.html#setSavepoint(
)
http://java.sun.com/j2se/1.4/docs/api/java/sql/Savepoint.html

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

See:
http://java.sun.com/j2se/1.4/docs/api/java/sql/PreparedStatement.html#getPar
ameterMetaData()
http://java.sun.com/j2se/1.4/docs/api/java/sql/ParameterMetaData.html

I think its very undesirable to fork the entire jdbc2 driver, just to be
able to add a couple of methods which throw "not implemented". In fact, I
find the current situation with jdbc1/jdbc2 too cumbersome already. It seems
the only alternative is some sort of conditional compilation using make or
ant. Any ideas?

In case someone wants to have a look, I've attached a patch which makes the
driver in current CVS compile with JDK 1.4b3. With this patch applied, the
driver _won't_ compile with JDK 1.3.x and older. Use at own risk :-)

Cheers,
René Pijlman <rene@lab.applinet.nl>

Вложения

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

Предыдущее
От: Antonio Fiol Bonnín
Дата:
Сообщение: Re: Bug with caching SQLTypes in Connection:getSQLType(oid)
Следующее
От: "Thomas O'Dowd"
Дата:
Сообщение: Re: patch against cvs for getTimestamp() problem.