On 6/13/06, Borut Bolčina <bob@najdi.si> wrote:
> What is the best (most elegant) solution to deploy standalone
> application on several servers each using two databases. I don't want to
> manually correct DomainMap (and DomainNode.driver) on each server to
> point to correct database.
>
> Databases A1..AN and B1..BN are identical, only data varies.
>
> server1:application:database_A1,database_B1
> server2:application:database_A2,database_B2
> ...
> serverN:application:database_AN,database_BN
>
> Should I create N DataNodes in modeler? Any hints appreciated.
There's an simpler way. This will e.g. generate 4 example Node definitions:
$ for db in dbname1 dbname2 dbname3 dbname4; do cat
cayenneNode.driver.xml | sed
"s/\(.*\)\/initialDbName\(.*\)/\1\/$db\2/g" > ${db}Node.driver..xml;
done
You could do the same to generate N cayenne.xml files, placing each
file (with it's respective node and mapping files in individual
directories, named dbname1, dbname2 etc.
The only assumption is that you have a UNIX shell within reach and are
ready to use it. :)
Cheers,
t.n.a.
This archive was generated by hypermail 2.0.0 : Tue Jun 13 2006 - 08:43:16 EDT