TomcatExpert

Oracle

Knowledge Base : Retrieving Inner Oracle Connections

posted by SpringSource on May 21, 2010 01:11 PM

Using DBCP or the connection pooling built into the Oracle JDBC driver implementation.

You should just be able to cast to the DBCP specific Connection class and from there retrieve the inner Oracle connection:

import org.apache.commons.dbcp.DelegatingConnection;
 
DelegatingConnection dc = (DelegatingConnection)conn;
OracleConnection oc = (OracleConnection)pc.getInnermostDelegate();

Note: If you are using Tomcat's built-in copy of DBCP then the import you will need is:

Read More

0 comments   |  

0
Rating
  |  

Developers | DBCP, Oracle

Syndicate content