public static Connection getInstance ( Connection conn ) { InvocationHandler handler = new JdbcLogConnection ( conn ) ; ClassLoader cl = Connection . class . getClassLoader ( ) ; return ( Connection ) Proxy . newProxyInstance ( cl , new Class [ ] { Connection . class } , handler ) ; }
Creates a logging version of a connection