Hi,
We're currently have an OracleLobHandler set to use the
SimpleNativeJbdcExtractor bundled with spring. The comments on
SimpleNativeJbdcExtractor say that it supports c3p0 out of the box but our
current experience seems to say otherwise.
On stepping through the spring code:
public Connection getNativeConnectionFromStatement(Statement stmt) throws
SQLException
{
return stmt.getConnection();
}
stmt is of type com.mchange.v2.c3p0.impl.C3P0PooledConnection$2@1c63791
and stmt.getConnection() returns a C3P0ProxyConnection [Invocation Handler:
com.mchange.v2.c3p0.impl.C3P0PooledConnection$ProxyConnectionInvocationHandler@1d7aa64]
.
Therefore when you step through to the
OracleLobHandler.getOracleConnection(PreparedStatement ps) method, the
conToUse variable is set to com.mchange.v2.c3p0.impl.$Proxy0 which is not
assignable to oracle.jdbc.OracleConnection (resulting in an exception).
It seems like the c3p0 proxies are getting in the way.
We are using c3p0 version 8.4.2 and spring-rc1. Is there some trick we need
to be pulling here to get this working? Or perhaps create a
C3P0NativeJdbcExtractor to pull the connection from the c3p0 proxy?
Thanks,
Dave
|