On Tue, Jun 4, 2013 at 11:29 AM, sebb <seb...@gmail.com> wrote: > DBCP is complicated to release, because the source has to be > pre-processed in order to build additional versions of the code. > (unlike the rest of Java, JDBC is not generally upwards compatible). >
Alternative proposal (worked for me in the past in similar situations): Create the instances of Connection, Statement, etc. using java.lang.reflect.Proxy, with a suitable InvocationHandler. The instances generated by Proxy are implementing the runtime version of the respective interface, hence no compatibility problems. The InvocationHandler doesn't implement anything, hence can adjust its behaviour at runtime to the proper JDBC version. Jochen -- "That's what prayers are ... it's frightened people trying to make friends with the bully!" Terry Pratchett. The Last Hero