You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by "Luo, Frank" <Fr...@sabre.com> on 2003/05/09 01:42:29 UTC
[dbcp] why Jdbc2PoolDataSource.getConnection() don't return DelegatingConnection?
Can someone tell me why Jdbc2PoolDataSource.getConnection() returning a cpdsAdapter.ConnectionImpl, instead of DelegatingConnection in a non-jndi environment?
To me, it is problematic to have a fact that conn1 is not the same as conn2 in the following code:
{
//conn1 is a cpdsAdapter.ConnectionImpl
Connection conn1 = Jdbc2PoolDataSource.getConnection();
Statement stmt = conn1.createStatement();
//conn2 is actually an Oracle connection
Connection conn2 = stmt.getConnection();
}
Thanks.