commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject RE: [dbcp] Re: trouble w/ dbcp fixed
Date Tue, 07 Jan 2003 16:22:00 GMT
I am strongly against hard-coding Class.forName. If doing so, what's the
point of using DBCP+JNDI?

"This Guy Thinks He Knows Everything"
"This Guy Thinks He Knows What He Is Doing"

-----Original Message-----
From: James Strachan [] 
Sent: January 7, 2003 11:10 AM
To: Paul Tomsic;
Subject: [dbcp] Re: trouble w/ dbcp fixed

forwarding to the list...

From: "Paul Tomsic" <>
> Hey, James.
> not that you've been worrying about it, but I thought
> that I'd drop a line and let you know I figured out
> how to fix my problem of about 6wks. ago, and to say
> thanks for trying to assist.
> To remind you, I was getting "Driver not found" 
> errors but following the example code that ships w/
> In the examples, they say that you should run them
> with a "-Djdbc.drivers=xxxx" to set up a system
> property for the driver (mySql in this case)
> Anyway, using a 
> System.setProperty("jdbc.drivers", "driverName");
> doesn't work, b/c apparently it's too late to set that
> system property and have tomcat read it.
> Instead, I've got to explicitly use
> Class.forName("driverName").newInstance();
> That's all there was to that.
> Anyway, maybe there's a method call on dbcp or
> something that I missed that allows for a better way
> to set that up, but the Class.forName().newInstance()
> did the trick.
> Thanks again.
> Paul


Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts

To unsubscribe, e-mail:
For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message