arglist[0] = ReflectionUtils.invokeMethod(conn, "getUnderlyingConnection", null);
tempBlob = createTempMethod.invoke(null, arglist); // null is valid because of static method
}
// C3P0 pool managed connection.
else if (NewProxyConnection.class.isAssignableFrom(connClassInCurrentClassLoader)) {
NewProxyConnection castCon = (NewProxyConnection) conn;
arglist[0] = C3P0ProxyConnection.RAW_CONNECTION;
tempBlob = castCon.rawConnectionOperation(createTempMethod, C3P0ProxyConnection.RAW_CONNECTION, arglist);
}
// Apache's DBCP pool managed connection.
else if (PoolableConnection.class.isAssignableFrom(connClassInCurrentClassLoader)) {
arglist[0] = ((PoolableConnection) statement.getConnection()).getDelegate();
tempBlob = createTempMethod.invoke(null, arglist); // null is valid because of static method