Saga continues ([Zope-DB] DCOracle2: close connection doesn't)

Bo M. Maryniuck b.maryniuk at forbis.lt
Sat Sep 27 07:21:52 EDT 2003


Hi!

I had figured out a bit what exactly holds the Oracle session after connection 
is disposed (by rewriting whole DA from the scratch for my own special needs 
:-). The main problem is because of volatile attributes in *cache*.

Here is basic __dict__ of my object (connected):

{'_v_connected': 1, 'id': 'DA_d7c407ed856661653f05e6ce31fbef0b', 
'__ac_local_roles__': {'bo': ['Owner']}, 'title': 'F Oracle DA', 
'_v_db_connection': <Products.FbOracleDA.FDA.DBFactory instance at 
0x91d006c>, '_DA__connectionString': 'XXXX/XXXX at XXXX', '_v_cursor': None}


This is the same object after it has been disconnected:

{'_v_connected': 1, 'id': 'DA_d7c407ed856661653f05e6ce31fbef0b', 
'__ac_local_roles__': {'bo': ['Owner']}, 'title': 'F Oracle DA', 
'_DA__connectionString': 'XXXX/XXXX at XXXX', '_v_cursor': None}

Yes, no _v_db_connection, because it was whacked at all. Also I've tried set 
it to None, but was the same effect. What effect? That Oracle session is 
still present!.. I just found: if you flush Zope cache, then it will dispose 
sessions (but a bit strange: sometimes session still present, but a bit 
less). Therefore this DA object just can not be cacheable. Second: is this a 
bug with volatile attributes?.. Yes, they will not be used after some time, 
but why they are not garbagecollected after they are None? How to make 
volatiles disposed for sure?

Any ideas?

-- 
HTH, Bogdan M.Maryniuck

System programmer, Forbis UAB





More information about the Zope-DB mailing list