|
From: <jue...@we...> - 2004-05-14 06:25:36
|
Former versions of C3P0 did work with SimpleNativeJdbcExtractor because =
they didn't wrap Statement.getConnection(); that's what the comment was =
referring to. Unfortunately, recent versions of C3P0 "fixed" this and =
return a wrapped Connection there too, and C3P0 doesn't provide any =
means to unwrap its wrappers. I've filed a C3P0 RFE for this, but no =
response in about two months.
=20
For the time being, I'm afraid you'll have to resort to a different =
connection pool, unless you manage to discover a way to access C3P0's =
underlying JDBC objects...
=20
Juergen
=20
________________________________
Von: spr...@li... im Auftrag =
von David Loeng
Gesendet: Fr 14.05.2004 07:20
An: spr...@li...
Betreff: [Springframework-developer] SimpleNativeJdbcExtractor support =
for c3p0
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$ProxyConnectionInvocationHa=
ndler@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
-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=3D2562&alloc_id=3D6184&op=3Dclick
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
|