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:
Popular Links