Michel Pelletier writes:
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
This seems too paranoid to me -- across *all* database adapters? (Or do you mean it serializes requests across all DA objects of a given class, or for a single DA object?) The function which opens a connection looks like this: def __init__(self,connection): self.connection=connection # XXX this is really only correct for Solid L = split(connection) connstr = join(L[0:3], ' ') user = L[3] ; password=L[4] db=self.db=self.Database_Connection(connstr, user, password) self.cursor=db.cursor() This is for Oracle, where it's OK to do multiple queries at a time with the same connection. For mxODBC, where that isn't possible, I was thinking that it would be sufficient to just have a dictionary mapping thread IDs to a specific database connection for that thread. Hmm... we're using PCGI. Does PCGI actually support multiple Zope threads? (A quick look through pcgi_publisher.py suggests not, so it might be academic until we start using ZServer.) -- A.M. Kuchling http://starship.python.net/crew/amk/ Capax is dead. There is no doubt of that. There is nothing in his space but darkness and cold and silence. -- Delirum checks on their quarry, in SANDMAN #44: "Brief Lives:4"