[Zope-dev] Question about _v_ attributes and database connections

Marco Bizzarri emmebi at icube.it
Thu Mar 11 06:56:28 EST 2004


On Thu, Mar 11, 2004 at 11:49:34AM +0000, Chris Withers wrote:
> Marco Bizzarri wrote:
> 
> > I'm trying something inspired to that at the moment... I succeeded in
> > installing an hack, very inspired from your code (but at a much simpler
> > level) and some code in the SecurityManager,
> 
> ?!

Look in AccessControl/SecurityManagement.py, the getSecurityManager()...
it does in that way.

> > where I mantain a dictionary
> > of connections, indexed by the result of thread.get_ident(). 
> 
> :-(

I know, it is an hack :(

> > Once a
> > thread needs a new connection, either it is present in the dictionary
> > or not. If it is present, give it to the thread and assign that to the
> > _v_database_connection attribute. Otherwise, create a new one, put in
> > the dictionary, and go on as before.
> 
> When do these connections get closed?

Never, for the moment.


-- 
Marco Bizzarri - Amministratore Delegato - Icube S.r.l.
Sede:   Via Ridolfi 15 - 56124 Pisa (PI), Italia 
E-mail: m.bizzarri at icube.it		WWW: www.icube.it	
Tel: 	(+39) 050 97 02 07		Fax: (+39) 050 31 36 588	
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope-dev/attachments/20040311/af7283f1/attachment-0001.bin


More information about the Zope-Dev mailing list