[Zope-dev] Prototype Zope mxODBC DA

Michel Pelletier michel@digicool.com
Mon, 11 Oct 1999 18:12:34 -0400


Andrew M. Kuchling wrote:
> 
> OK.  Our situation is that I really, *really* want to start using
> Zope2, but can't without a working DA.  Unless the rewritten ODBC
> driver is going to be available quite soon, I'd like to continue down
> the path of the hacked ZOracleDA...

Yeah it won't be too soon, go for it.

> which means I need to test it some
> more.  Any suggestions on how to check a DA for correctness?

Your asking *us* about testing procedures? hah!
 
> The docs for mxODBC states that it's thread-safe, as long you
> have one connection per thread.  So this would mean that the mxODBC DA
> could be a Level 2 DA, but I'd have to rewrite the code to keep a
> separate connection for each thread.  Any idea how that should be
> done?

Use the TM_THUNKED mixin instead of TM.  This will serialize *all* of
your database requests across all database adapters at the transaction
boundary (the old kludgy SybaseDA does this).  Guaranteed to be safe,
but not very scalable.  The only way I can think of Zope trying to break
the one connection per thread rule is if you made two simultaneous
queries in the same web request, I doubt that can happen.  Chris thinks
that in 99% of all use cases this ins't a problem, but I speak for
nobody.

-Michel

> 
> --
> A.M. Kuchling                   http://starship.python.net/crew/amk/
> Whoever ceases to be a student has never been a student.
>     -- George Iles
> 
> _______________________________________________
> Zope-Dev maillist  -  Zope-Dev@zope.org
> http://www.zope.org/mailman/listinfo/zope-dev
> 
> (Related lists - please, no cross posts or HTML encoding!
> 
> To receive general Zope announcements, see:
> http://www.zope.org/mailman/listinfo/zope-announce
> 
> For non-developer, user-level issues,
> zope@zope.org, http://www.zope.org/mailman/listinfo/zope )