cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: Driver+ClassLoader issue
Date Thu, 10 Apr 2008 15:03:48 GMT
Scott,

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?

Thanks
Andrus

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
>


Mime
View raw message