Return-Path: Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 1033 invoked by uid 98); 18 Dec 2002 17:41:40 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Received: (qmail 1008 invoked from network); 18 Dec 2002 17:41:38 -0000 Received: from daedalus.apache.org (HELO apache.org) (63.251.56.142) by nagoya.betaversion.org with SMTP; 18 Dec 2002 17:41:38 -0000 Received: (qmail 99347 invoked by uid 500); 18 Dec 2002 17:40:24 -0000 Received: (qmail 99340 invoked from network); 18 Dec 2002 17:40:24 -0000 Received: from icarus.apache.org (63.251.56.143) by daedalus.apache.org with SMTP; 18 Dec 2002 17:40:24 -0000 Received: (qmail 23629 invoked by uid 1059); 18 Dec 2002 17:40:24 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 18 Dec 2002 17:40:24 -0000 Date: Wed, 18 Dec 2002 09:40:24 -0800 (PST) From: "Craig R. McClanahan" To: Jakarta Commons Users List Subject: RE: tomcat jndi + commons-dbcp problem - to Craig In-Reply-To: Message-ID: <20021218093704.E21980-100000@icarus.apache.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: localhost 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N On Wed, 18 Dec 2002 pqin@shareowner.com wrote: > Date: Wed, 18 Dec 2002 12:24:47 -0500 > From: pqin@shareowner.com > Reply-To: Jakarta Commons Users List > To: commons-user@jakarta.apache.org > Subject: RE: tomcat jndi + commons-dbcp problem - to Craig > > Thanks Craig. > > - I did setup according to the one you mentioned in your posting, web.xml, > server.xml. > - I never got any answer from tomcat user list. Since my issue deals with > commons-dbcp, I posted here instead. > - A typo in my posting, it should be javax.sql.DataSource. > - I placed jdbc2_0-stdext.jar in my application's WEB-INF/lib folder and > classes12.jar in $CATALINA_HOME/common/lib The first part of this is a mistake. The jdbc2_0-stdext.jar file is already there in common/lib, and should *not* be installed in your webapp. > - The connection returned is org.apache.commons.dbcp.PoolableConnection > neither OraclePoolableConnection nor OracleConnection > > Question, is org.apache.commons.dbcp.BasicDataSource smart enough to return > an driver-specific connection, in this case, OraclePoolableConnection or > OracleConnection? > You should be casting the returned connection object to java.sql.Connection, and not trying to worry about it's internal Oracle implementation class name. The object returned by commons-dbcp is a wrapper around whatever Connection implementation your JDBC driver returns. Craig