> Since ObjectContext (server or ROP client) is a "disconnected" object in > Cayenne transactions are something different compared to say Hibernate > (that's my guess anyways, I don't know much about Hibernate). Cayenne server > transactions are a "bridge" to JDBC transactions (there's not Cayenne > specific transactional behavior, other than locking a JDBC connection for the > operation duration, and allowing users to delineate a custom JDBC tx scope).
Very interesting for me, as I write about transaction for the article at the moment. You wrote, ObjectContext is some kind of a "disconnected" object. If I create two new objects in the ObjectContext, when does the transaction start exactly? Is it when I call "registerNew" on the first object or is it when I commit my changes (it then would create a transaction, commit both new objects, close transaction)? > > Since there's no JDBC on the ROP client, there are no Cayenne transaction > there. Potentially we can extend this abstraction to the client, but it was > thought originally that this will break a simple request/response > webservice'y feel of ROP. Makes perfect sense Cheers > > Andrus > > > On Jul 25, 2011, at 6:18 PM, Christian Grobmeier wrote: > >>>> I was just surprise that getDataDomain() is not in CayenneRuntime. It >>>> seemed to me that would be the logical place. I can see getChannel and >>>> getContext is in CayenneRuntime too. So, why not getDataDomain? >>> >>> The answer is ROP. DataDomain is a "server" configuration object, and is >>> not available in the "client" (ROP) configuration. >> >> Ah understood >> >> Does that mean a "ROP client" is not meant to work with transactions, >> only the "ROP server" is? (not knowing to much about ROP at the >> moment) >> >> Cheers >> Christian >> >>> >>> Andrus >>> >>> >> >> >> >> -- >> http://www.grobmeier.de >> > > -- http://www.grobmeier.de
