Hi Jochen, Jochen Wiedmann wrote:
> 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. This is here not possible, since we provide *implementations* that implement the affected interfaces. E.g. Statement interface has more methods which have arguments of types that are not even present in the older JDBC version i.e. you cannot even compile this source with the older JDK. Therefore all this filtering. Cheers, Jörg --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org