commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simon <skitch...@apache.org>
Subject RE: [DBCP] Newbie question again
Date Thu, 06 Sep 2007 19:38:31 GMT
Yep. Oracle really screwed up with their drivers. An old one which is
not compatible with new DBs. A new one that is not backwards compatible.
And both use the same classname. Sigh.

Stephane, your English was fine the first time, I just think that very
few people have needed to load both the old and new drivers at the same
time (which is what I presume you are trying to do).

I think you are really asking why DBCP doesn't provide a way for code to
pass the driver class in, rather than just pass the name of the driver
class in. In other words, why BasicDataSource has
  public void setDriverClassName(String name)
but not
  public void setDriverClass(Class clazz);

Is that right?

Regards,

Simon

On Thu, 2007-09-06 at 19:13 +0200, Stéphane Rault wrote:
> I'm afraid this is actually a DBCP qsuestion. Java permit to load severals
> versions of the same class using classloaders. In a personal development, I
> managed to load 2 drivers separately using Class.forName(String className,
> boolean initiliaze, ClassLoader classLoader) twice.
> But using, DBCP and the BasicDataSourceObject, I can only give the name of
> the class.
> 
> Is that right ?
> 
> Stéphane.
> 
> > -----Message d'origine-----
> > De : jcarman@carmanconsulting.com 
> > [mailto:jcarman@carmanconsulting.com] De la part de James Carman
> > Envoyé : jeudi 6 septembre 2007 12:48
> > À : Jakarta Commons Users List
> > Objet : Re: [DBCP] Newbie question again
> > 
> > This is not a DBCP question, but a Java question.  I would 
> > try using the latest JDBC driver, since they are usually 
> > compatible with older versions of Oracle.
> > 
> > On 9/6/07, Stéphane Rault <stephane.rault@selic.fr> wrote:
> > > Hello again
> > >
> > > I repost my question. Perharps, my question is difficult to 
> > understand 
> > > due to my poor english ? Or there is no solution for my 
> > problem with 
> > > DBCP ? Or the answer is evident and I didn't found it ?
> > >
> > > Thanks in advance.
> > >
> > > Stéphane.
> > >
> > > -----Message d'origine-----
> > > De : Stéphane Rault [mailto:stephane.rault@selic.fr] Envoyé 
> > : mardi 4 
> > > septembre 2007 11:08 À :
> > > Objet : Newbie question
> > >
> > > Hello everybody.
> > >
> > > I'm using BasicDataSource to work with differents database 
> > in our own 
> > > database pool. My problem is that I must work with 
> > different version 
> > > of Oracle that need different versions of the same class. 
> > Is there a 
> > > possibility to precise the needed jar with the driver class (I can 
> > > also give an URLClassLoader to localize the jar to the 
> > corresponding version).
> > >
> > > Can DBCP help me there ?
> > >
> > > Thanks in advance.
> > >
> > > Stéphane.
> > >
> > >
> > > 
> > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> > > For additional commands, e-mail: user-help@commons.apache.org
> > >
> > >
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> > For additional commands, e-mail: user-help@commons.apache.org
> > 
> > 
> > 
> > --
> > No virus found in this incoming message.
> > Checked by AVG Free Edition. 
> > Version: 7.5.485 / Virus Database: 269.13.7/992 - Release 
> > Date: 06/09/2007 08:36
> > 
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
> 


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


Mime
View raw message