cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: Using two different DBs
Date Tue, 30 Aug 2011 21:40:20 GMT

On Aug 30, 2011, at 5:09 PM, Andrus Adamchik wrote:

> Finally in yet unreleased 3.1M3 it will be even easier (this code exists on trunk already).
Cayenne can merge multiple mappings in runtime, so you may create 2 projects in the Modeler:
> 
> 1. A common DataMap + one of DataNodes, say cayenne-map.xml
> 2. A project with only a DataNode using the same name as DataNode from project 1, say
cayenne-map-db2.xml
> 
> and then load 2 stacks as this:
> 
>   ServerRuntime r1 = new ServerRuntime("cayenne-map.xml");
>   ServerRuntime r2 = new ServerRuntime(new String[] { "cayenne-map.xml", "cayenne-map-db2.xml"});


Veering offtopic here with a bit of 3.1 advertising :) Cayenne has always allowed a lot of
stack configuration flexibility compared to the alternatives. Things like multiple DataDomains,
multiple DataNodes per domain, the ability to change configuration on the fly, etc. Now 3.1
DI makes this flexibility much more accessible to end users and incomparably easier to manage.


The other day I started some work on 3.1 PDF documentation [1]. A few chapters that are mostly
done are dealing with the topic of customization (namely Chapter 11 and Appendix A)

Cheers,
Andrus

[1] http://people.apache.org/~aadamchik/misc/cayenne-guide-08302011.pdf


Mime
View raw message