cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rigel <zeta...@gmail.com>
Subject RE: Loading cayenne mapped class from URLClassLoader
Date Mon, 24 Nov 2008 23:47:18 GMT

Tnx, this approach for driver loading sounds really more comfortable than
mine of heavily using reflection.




Scott A wrote:
> 
> Incidentally, you can load the JDBC driver at runtime; you don't have to
> have it on the CP. You'll have to wrap it with a shim loaded by the
> system CL, though, because DriverManager will choke on the non-system
> CL, for whatever reason. http://www.kfu.com/~nsayer/Java/dyn-jdbc.html
> Toss the shim'd driver in to the DriverManager, and pass null to Cayenne
> for the driver (which tells it to ask DriverManager for a driver), and
> you should be good to go. You can see an example of my DataSourceFactory
> here:
> http://bnubot.googlecode.com/svn/trunk/BNUBot/src/net/bnubot/db/conf/Cay
> enneConfiguration.java
> 
> 

-- 
View this message in context: http://www.nabble.com/Loading-cayenne-mapped-class-from-URLClassLoader-tp20654024p20672509.html
Sent from the Cayenne - User mailing list archive at Nabble.com.

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