[Zope-DB] Zope database connectivity
Dieter.Maurer at Haufe.de
Dieter.Maurer at Haufe.de
Thu Sep 28 13:50:10 EDT 2006
Maciej Wisniowski wrote at 2006-9-27 21:38 +0200:
> ...
>To be able to finish whole transaction
>for the relational DB...
No.
There are two reasons:
1. that later operations see the effects of earlier
operations in the same request
and more importantly
2. to avoid deadlocks.
The relational database system allocates resources to connections
and often keeps it until the transaction finishes.
Whenn all operations towards the same database use
the same connection, the database can recognized
resources already allocated for the request.
If, however, the request uses different connections,
it may require a resource it already has locked via
a different connection (therefore, the database cannot
know, that it is the owner already) and this will
inevitably result in a deadlock.
> ...
>The problem is to be able to determine which connection from
>pool is being used during request (transaction).
Yes.
If one is careful, one can find a reliable solution...
--
Viele Grüße
Dieter
Tel: 06894-870 177
More information about the Zope-DB
mailing list