public class ConnectionWrapper implements Connection{
     private Connection realConn;
     ...
     ...
//注意,必须定义为public,因为Connection接口中为public.另外建议你多理解程序的错误提示。其实上面的出错提示很清楚了。
 PreparedStatement prepareStatement(String sql,int[] columnIndexes){
        if (isClosed) {
            throw new SQLException("Pooled connection is closed");
        }
        return realConn.prepareStatement(sql,columnIndexes);
     }
   ...
}
关于第二个问题,可能各个jdbc的驱动,都有不同的实现方法。