On Nov 22, 2005, at 6:31 PM, Dov Rosenberg wrote:
> Does cayenne support multiple db connections from a single model?
> We are running into issues with EOF with its single db connection
> stack.
I thought EOF ca. WO 5.2 fixed the global lock problem?
Anyways, in Cayenne there wasn't such a problem from the beginning.
Cayenne pooling support means two things -
(1) It doesn't lock the whole stack during DB operations, thus
allowing standard JDBC pool to work (the one hidden under
javax.sql.DataSource API). Locking of shared resources (DataRowStore)
still occurs, but in a much smaller window and, importantly, OUTSIDE
of the DB operation.
(2) Unless you care to change that, by default Cayenne supplies its
own pooling DataSource that works with any driver (see "Min
Connections"/"Max Connections" fields in the DataNode panel in the
Modeler - this is how pool is configured).
> Is there an equivalent to the EOF SharedEditingContext?
Yes, this is done a bit differently (and cleaner IMO) via cached
query results:
http://objectstyle.org/cayenne/userguide/fetch/result-caching.html
http://objectstyle.org/cayenne/userguide/perform/caching-lookup.html
Andrus
This archive was generated by hypermail 2.0.0 : Tue Nov 22 2005 - 11:11:46 EST