You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by André Rothe <ar...@phosco.info> on 2011/01/25 14:31:23 UTC
Multiple connections per transaction
Hi,
I have seen, that Cayenne uses multiple connections per transaction (a
DataNode can have multiple connections and it can add multiple
connections to a transaction). I ask myself, how can Cayenne ensure
some visibility problems, which depend on the isolation level of the
underlying datastore? I think, you could get different results from
different connections.
~André
Re: Multiple connections per transaction
Posted by André Rothe <ar...@phosco.info>.
Ah, okay. TransactionDataSource get always the same connection for the
specified DataNode or creates a new one, if no connection exists. So
you will have multiple connection within a transaction only if you
have a transaction over multiple DataNodes.
Thank you
André
Andrus Adamchik <an...@objectstyle.org> wrote:
> Actually recent versions of Cayenne (3.0, maybe earlier) are
> ensuring a use of a single connection per transaction.
>
> Andrus
>
> On Jan 25, 2011, at 3:31 PM, André Rothe wrote:
>
>> Hi,
>>
>> I have seen, that Cayenne uses multiple connections per transaction
>> (a DataNode can have multiple connections and it can add multiple
>> connections to a transaction). I ask myself, how can Cayenne ensure
>> some visibility problems, which depend on the isolation level of
>> the underlying datastore? I think, you could get different results
>> from different connections.
>>
>> ~André
>>
>
>
Re: Multiple connections per transaction
Posted by Andrus Adamchik <an...@objectstyle.org>.
Actually recent versions of Cayenne (3.0, maybe earlier) are ensuring a use of a single connection per transaction.
Andrus
On Jan 25, 2011, at 3:31 PM, André Rothe wrote:
> Hi,
>
> I have seen, that Cayenne uses multiple connections per transaction (a DataNode can have multiple connections and it can add multiple connections to a transaction). I ask myself, how can Cayenne ensure some visibility problems, which depend on the isolation level of the underlying datastore? I think, you could get different results from different connections.
>
> ~André
>