cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott Anderson" <>
Subject RE: Driver+ClassLoader issue
Date Thu, 10 Apr 2008 18:53:07 GMT
Works great, thanks :).

-----Original Message-----
From: Andrus Adamchik [] 
Sent: Thursday, April 10, 2008 11:04 AM
Subject: Re: Driver+ClassLoader issue


I started looking at CAY-1024 patch, and came to a conclusion that  
there is a simpler and more consistent solution. Instead of Cayenne  
failing over to DriverManager in 'setDriverClassName' (which arguably  
can return a driver with a different class name that does not match  
the method argument, hence creating confusion), can you simply set the  
driver class name to NULL. 'getConnection' method then will consult  
DriverManager and return the driver you specified.

Could you check that it works for you?


On Apr 4, 2008, at 7:58 PM, Scott Anderson wrote:

> I am using a special wrapper around my Driver so that I don't need to
> have the jar on the classpath. This trick clashes with the
> DriverDataSource class. Instead of failing immediately if the class
> doesn't exist, it might be prudent to check with the
> java.sql.DriverManager first - or, heck, even go there first - after
> all, that is the standard way of obtaining a Driver.
> Regards,
> Scott

View raw message