[Zope-DB] Per-user connections

M.-A. Lemburg mal@lemburg.com
Tue, 10 Dec 2002 12:45:41 +0100

Bo M. Maryniuck wrote:
> On Monday 09 December 2002 12:21, M.-A. Lemburg wrote:
>>They are. Try it and see :-)
> Can you do simple example?
> session = context.REQUEST['SESSION']
> session['generateCrashHere'] = context.someDbConnection()

You'll have to create a new Zope Connection object (provided by
the DA) from scratch for this to work. The above will just
give you a physical connection object to the database using the
Zope Connection object already created in the context.

>>I think you are talking about the underlying physical connections.
> Yes, because otherwise you'll have problems with transactions and triggers. At 
> least in Oracle -- for sure. Or I've missed something?

If you create a new logical Connection object then you shouldn't run
into these problems.

Marc-Andre Lemburg
CEO eGenix.com Software GmbH
eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,...
Python Consulting:                               http://www.egenix.com/
Python Software:                    http://www.egenix.com/files/python/