[Zope-dev] Singleton DA possible?

Brad Clements bkc@murkworks.com
Wed, 17 Jul 2002 16:07:20 -0400


The gvibDA interbase adapter really must have exactly one database connection 
shared among all threads.

Even though the DA is derived from THUNKED_TM, there are still multiple instances of 
the DA created, one for each thread (depending on server load).

What I really want is "one DA" that is controlled through a thread-lock for all threads.

I realize I may need to create a proxy object.. any suggestions on how best to design 
this?

--

Also, even running Zope with -t 1, I still sometimes get 2 DA objects. I can even see 
that the __del__ method on the earlier DA instance is being called. But that still messes 
it up.


Brad Clements,                bkc@murkworks.com   (315)268-1000
http://www.murkworks.com                          (315)268-9812 Fax
AOL-IM: BKClements