Saga continues ([Zope-DB] DCOracle2: close connection doesn't)
Bo M. Maryniuck
b.maryniuk at forbis.lt
Tue Sep 30 04:12:15 EDT 2003
On Monday 29 September 2003 19:56, Dieter Maurer wrote:
> You are working with a DCOracle2 connection directly.
> When your "teardown" method is called (are you sure, it is?),
Sure what -- is it called? Yes, I am sure.
> then Zope has no longer anything to do with it.
What do you mean by that? Oracle will drop any session, if there is no pointer
to its connector anymore. So if I do in pure Python cursor.close() and
db.close(), it drops the session immediately.
> Thus, it is not Zope (in this case) that keeps your session alive.
OK. Let's go step-by-step through very basic and simple test to get know what
can keep *Oracle* session alive and you just track here and put comments
below where is wrong way, ok? Thank you.
1. I have self._v_test = None variable in __init__(). The empty one.
2. Now I call self._v_test = DCOracle2.connect('XXX/XXX at XXX')
3. So I see (in Oracle) new session created for 'XXX' user.
4. In pure Python, I call (basically) self._v_test.close() and then
Oracle session disappears immediately. Here I call it in the same way.
5. Voila. Oracle session disappeared either.
But if I do the same thing several times (10-50), I see that some of the
sessions are present and NOT closed. After I click on Cache button "Minimize"
it disappears. So how to explain it? Why one time it disappeared, other time
> Zope is not to blame
I really want to beleive in that...
Regards, Bogdan M.Maryniuck
System programmer, Forbis UAB
More information about the Zope-DB