cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Baldwin <>
Subject Re: Switching Between Databases
Date Thu, 19 Jul 2007 07:11:40 GMT

OK, you asked for an idea (this is untested):

Java defines a DataSource interface: 

Is it possible to drill down and create a connection pool as  
described in this link and then set the desired DataSource via the  
Cayenne DataNode class during runtime? 

A connection-pool  *sounds* like what you are describing.  (Having  
said this, there is probably a more elegant connection-pool manager  
in one of the Utility classes. :) )


On Jul 18, 2007, at 10:23 PM, Malcolm Edgar wrote:

> Hi All,
> what is an easy way to switch between databases in Cayenne, while
> maintaining the same mapping file.
> We are going on the road doing demos, with different MySQL  
> databases (same
> schema design), and want to be able to switch between them with the  
> same
> application. Is there an way to do this is Cayenne. My concern it  
> that the
> schema name is defined in the cayenne mapping file.
> Any ideas?
> regards Malcolm Edgar

View raw message