[DBCP-506] Support JDBC 4.2: new CallableStatement methods.
diff --git a/src/main/java/org/apache/commons/dbcp2/DelegatingCallableStatement.java b/src/main/java/org/apache/commons/dbcp2/DelegatingCallableStatement.java
index 762c724..2e36c2b 100644
--- a/src/main/java/org/apache/commons/dbcp2/DelegatingCallableStatement.java
+++ b/src/main/java/org/apache/commons/dbcp2/DelegatingCallableStatement.java
@@ -30,6 +30,7 @@
 import java.sql.Ref;
 import java.sql.RowId;
 import java.sql.SQLException;
+import java.sql.SQLType;
 import java.sql.SQLXML;
 import java.sql.Time;
 import java.sql.Timestamp;
@@ -772,6 +773,47 @@
         }
     }
 
+    /**
+     * @since 2.5.0
+     */
+    @Override
+    public void registerOutParameter(final int parameterIndex, final SQLType sqlType) throws SQLException {
+        checkOpen();
+        try {
+            getDelegateCallableStatement().registerOutParameter(parameterIndex, sqlType);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
+
+    /**
+     * @since 2.5.0
+     */
+    @Override
+    public void registerOutParameter(final int parameterIndex, final SQLType sqlType, final int scale)
+            throws SQLException {
+        checkOpen();
+        try {
+            getDelegateCallableStatement().registerOutParameter(parameterIndex, sqlType, scale);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
+
+    /**
+     * @since 2.5.0
+     */
+    @Override
+    public void registerOutParameter(final int parameterIndex, final SQLType sqlType, final String typeName)
+            throws SQLException {
+        checkOpen();
+        try {
+            getDelegateCallableStatement().registerOutParameter(parameterIndex, sqlType, typeName);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
+
     @Override
     public void registerOutParameter(final String parameterName, final int sqlType) throws SQLException {
         checkOpen();
@@ -804,6 +846,47 @@
         }
     }
 
+    /**
+     * @since 2.5.0
+     */
+    @Override
+    public void registerOutParameter(final String parameterName, final SQLType sqlType) throws SQLException {
+        checkOpen();
+        try {
+            getDelegateCallableStatement().registerOutParameter(parameterName, sqlType);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
+
+    /**
+     * @since 2.5.0
+     */
+    @Override
+    public void registerOutParameter(final String parameterName, final SQLType sqlType, final int scale)
+            throws SQLException {
+        checkOpen();
+        try {
+            getDelegateCallableStatement().registerOutParameter(parameterName, sqlType, scale);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
+
+    /**
+     * @since 2.5.0
+     */
+    @Override
+    public void registerOutParameter(final String parameterName, final SQLType sqlType, final String typeName)
+            throws SQLException {
+        checkOpen();
+        try {
+            getDelegateCallableStatement().registerOutParameter(parameterName, sqlType, typeName);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
+
     @Override
     public void setAsciiStream(final String parameterName, final InputStream inputStream) throws SQLException {
         checkOpen();
@@ -1167,6 +1250,33 @@
         }
     }
 
+    /**
+     * @since 2.5.0
+     */
+    @Override
+    public void setObject(final String parameterName, final Object x, final SQLType targetSqlType) throws SQLException {
+        checkOpen();
+        try {
+            getDelegateCallableStatement().setObject(parameterName, x, targetSqlType);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
+
+    /**
+     * @since 2.5.0
+     */
+    @Override
+    public void setObject(final String parameterName, final Object x, final SQLType targetSqlType,
+            final int scaleOrLength) throws SQLException {
+        checkOpen();
+        try {
+            getDelegateCallableStatement().setObject(parameterName, x, targetSqlType, scaleOrLength);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
+
     @Override
     public void setRowId(final String parameterName, final RowId value) throws SQLException {
         checkOpen();
diff --git a/src/test/java/org/apache/commons/dbcp2/TesterCallableStatement.java b/src/test/java/org/apache/commons/dbcp2/TesterCallableStatement.java
index 31ad314..d90edd4 100644
--- a/src/test/java/org/apache/commons/dbcp2/TesterCallableStatement.java
+++ b/src/test/java/org/apache/commons/dbcp2/TesterCallableStatement.java
@@ -29,6 +29,7 @@
 import java.sql.Date;
 import java.sql.Ref;
 import java.sql.SQLException;
+import java.sql.SQLType;
 import java.sql.Time;
 import java.sql.Timestamp;
 import java.util.Calendar;
@@ -381,6 +382,21 @@
     }
 
     @Override
+    public void registerOutParameter(int parameterIndex, SQLType sqlType) throws SQLException {
+        // Do nothing
+    }
+
+    @Override
+    public void registerOutParameter(int parameterIndex, SQLType sqlType, int scale) throws SQLException {
+        // Do nothing
+    }
+
+    @Override
+    public void registerOutParameter(int parameterIndex, SQLType sqlType, String typeName) throws SQLException {
+        // Do nothing
+    }
+
+    @Override
     public void registerOutParameter(final String parameterName, final int sqlType) throws SQLException {
     }
 
@@ -393,6 +409,21 @@
     }
 
     @Override
+    public void registerOutParameter(String parameterName, SQLType sqlType) throws SQLException {
+        // Do nothing
+    }
+
+    @Override
+    public void registerOutParameter(String parameterName, SQLType sqlType, int scale) throws SQLException {
+        // Do nothing
+    }
+
+    @Override
+    public void registerOutParameter(String parameterName, SQLType sqlType, String typeName) throws SQLException {
+        // Do nothing
+    }
+
+    @Override
     public void setAsciiStream(final String parameterName, final InputStream inputStream) throws SQLException {
     }
 
@@ -537,6 +568,17 @@
     }
 
     @Override
+    public void setObject(String parameterName, Object x, SQLType targetSqlType) throws SQLException {
+        // Do nothing
+    }
+
+    @Override
+    public void setObject(String parameterName, Object x, SQLType targetSqlType, int scaleOrLength)
+            throws SQLException {
+        // Do nothing
+    }
+
+    @Override
     public void setRowId(final String parameterName, final RowId value) throws SQLException {
     }