[Zope] SLQ-connection Pooling

Matthew T. Kromer matt@zope.com
Mon, 12 Aug 2002 09:51:23 -0400


kapil thangavelu wrote (in reply to Dario Lopez-K=E4sten):

>out of curosity, what version of DCOracle2 are you using? matt's fixed a=
=20
>couple of things in cvs.
> =20
>

I've probably broken a number of things too.  Caveat emptor.

>>What I am wondering about is connection pooling. I am not sure if a
>>DB-connection object pools it's connections or not. This has some impac=
t
>>on how we configure our oracle client.
>>   =20
>>
>
>the db adapter itself knows nothing of pooling (its an automatic benefit=
 to=20
>the way the zodb works),  the oracle connection is persistent as long as=
 the=20
>db adapter remains in the cache.
> =20
>

Well, I've had the notion of putting in actual session pooling abilities=20
into the adapter; both to support Oracle 9i's ability to create=20
connection pools, and because you technically can run more than one=20
session over the same TCP connection with Oracle 8i. =20

There is not any demand for these features though as far as I can tell.=20
 I've never heard a peep from someone using DCOracle2 with any kind of=20
transaction monitor.  I added some ability to get/set the transaction=20
XID in CVS, but since I'm not a transaction monitor user, I really dont=20
know if it does the right thing or not.  I know it can screw up the=20
connection  :)

In any case, you are correct.  It isn't really ZODB per se that manages=20
connection pools in the database, other than the fact that each thread=20
in Zope gets its own copy of any objects it uses; thus, each active=20
thread will have its own connection to the database.  When the objects=20
are released, they are cached rather than destroyed immediately, so the=20
next transaction may be able to obtain a connection object with an open=20
connection.

--=20
Matt Kromer
Zope Corporation  http://www.zope.com/=20