|
From: Magnus H. <ma...@fi...> - 2006-03-13 13:00:40
|
Hi.
I'm not sure if this is a bug, new feature, or if it's me just being dumb :=
)
I have a class that extends JdbcDAOSupport. I'm using
com.mchange.v2.c3p0.ComboPooledDataSource,
org.springframework.orm.hibernate3.LocalSessionFactoryBean and
org.springframework.jdbc.support.nativejdbc.C3P0NativeJdbcExtractor.
I do this:
conn =3D (OracleConnection) getJdbcTemplate()
=09=09=09=09=09.getNativeJdbcExtractor().getNativeConnection(
=09=09=09=09=09=09=09DataSourceUtils.getConnection(getDataSource()));
in the c3p0jdbcextractor, this instanceof
protected Connection doGetNativeConnection(Connection con) throws SQLExcept=
ion {
=09=09if (con instanceof C3P0ProxyConnection) {
returns true when using hibernate 3.0.5. When using 3.1.2 however,
"con" looks like this:
con=3D $Proxy19 (id=3D196)
=09h=3D BorrowedConnectionProxy (id=3D253)
=09=09connectionManager=3D ConnectionManager (id=3D256)
=09=09=09batcher=3D BatchingBatcher (id=3D261)
=09=09=09borrowedConnection=3D $Proxy19 (id=3D196)
=09=09=09callback=3D JDBCContext (id=3D265)
=09=09=09connection=3D NewProxyConnection (id=3D268)
=09=09=09factory=3D SessionFactoryImpl (id=3D269)
=09=09=09interceptor=3D EmptyInterceptor (id=3D275)
=09=09=09isClosed=3D false
=09=09=09releaseMode=3D ConnectionReleaseMode (id=3D278)
=09=09=09wasConnectionSupplied=3D false
=09=09useable=3D true
the "con" when used hibernate 3.0.5 is now in
con->h->connectionManager->connection
Is this a configuration error, hibernate bug, C3P0NativeJdbcExtractor
bug, or what?
--
/Magnus Heino
|