Create a wrapper for java.sql.Connection that works with JDBC 3 and 4

Is there any hack for creating a wrapper for java.sql.Connection that works with JDBC 3 and 4 (Sun has added several methods and new types to the interface for JDBC 4) without resorting to something that fixes the source in time compilation?

My use case is that I need to create a library that works with Java 5 and 6, and I would really like to avoid creating two versions of it.

+3
source share
1 answer

I have not tried it, but it can work.

Java 6. java.sql(NClob, SQLXML, SQLClientInfoException). , ( , Java 5), ​​ . Java 5 - Xbootclasspath, .

, , Java 5 6 ( ), , , , Java 6 , (. state )

+1

Source: https://habr.com/ru/post/1711671/


All Articles