On Wed, 18 Dec 2002 [EMAIL PROTECTED] wrote:
> Date: Wed, 18 Dec 2002 11:33:51 -0500 > From: [EMAIL PROTECTED] > Reply-To: Jakarta Commons Users List <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Subject: tomcat jndi + commons-dbcp problem > These questions are actually appropriate on the TOMCAT-USER list, but what the heck ... > Tomcat's JNDI simulation uses commons-dbcp. > > I have several questions to ask. > > - Can I get an oracle Connection from data source if I use oracle's jdbc > driver? Yes. For Tomcat 4.1, there's example setups for this in the docs shipped with Tomcat, or online: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html > - "Are all those DBCP classes, such as BasicDataSource, or > PoolableConnection not castable?" I can't cast BasicDataSource to > java.sql.DataSource, for example. There's no such thing as "java.sql.DataSource", but there is "javax.sql.DataSource" -- and that is the correct interface to cast to. It works as long as you don't mess around with the class loader hierarchy by trying to put jdbc2_0-stdext.jar somewhere it doesn't belong. > > > Regards, > > > > Phillip Qin Craig McClanahan -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
