commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@shareowner.com
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?

Regards,
 
 
PQ
 
"This Guy Thinks He Knows Everything"
"This Guy Thinks He Knows What He Is Doing"

-----Original Message-----
From: James Strachan [mailto:james_strachan@yahoo.co.uk] 
Sent: January 7, 2003 11:10 AM
To: Paul Tomsic; commons-user@jakarta.apache.org
Subject: [dbcp] Re: trouble w/ dbcp fixed

forwarding to the list...

From: "Paul Tomsic" <ptomsic@yahoo.com>
> 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/
> DBCP.
> 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
> 


James
-------
http://radio.weblogs.com/0112098/

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

--
To unsubscribe, e-mail:
<mailto:commons-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:commons-user-help@jakarta.apache.org>

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