As usual, great answer. I can see better the picture now. Many Thanks! A final question: In order to properly handle trx across multiple DBs, can we use as much DataDomains as DBs?
In this case, each DataDomain defines its DataNode(s) (DNs: same DB + different schemas). We can then have several DataContexts that we have to handle in the application end. Thanks On Tue, Feb 21, 2012 at 7:52 AM, Andrus Adamchik <[email protected]>wrote: > > On Feb 21, 2012, at 9:41 AM, Andrus Adamchik wrote: > > >> > >> Is it better to have an ObjectContext per DataNode (and not per > DataDomain) > >> so that we can handle all cases? > > > > If you are ok with partial rollback and would want to keep using Cayenne > transactions, this may be the way to go. > > To clarify, context per DN won't alter the rollback behavior compared to > one context for multiple DNs. But it will make the failures more easy to > handle on the app end, as the states of persistent objects in the > corresponding contexts after the commit attempt will correctly reflect > their DB state. > > Andrus > >
