[Z3-sqlos] Different database connections for different sqlobject containers
Sidnei da Silva
sidnei at awkly.org
Sat Oct 9 15:36:44 CEST 2004
| Sidnei suggested I look in ConnectionDescriptor for a way to do this,
| but I couldn't figure out how to access any contextual information from
| there. Without the context I don't think there's a way to decide
| between different connections.
If you look again, there's this code:
try:
ut = zapi.getUtility(IConnectionName, context=context)
except ComponentLookupError:
....
This is where you could hook looking up a different connection. Or
even changing the getConnection method below. Or even better: if you
add a local connection, and keep the same name, it will pick your
local connection in preference to the global one.
--
Sidnei da Silva <sidnei at awkly.org>
http://awkly.org - dreamcatching :: making your dreams come true
http://www.enfoldsystems.com
http://plone.org/about/team#dreamcatcher
C Code.
C Code Run.
Run, Code, RUN!
PLEASE!!!!
More information about the z3-sqlos
mailing list