I am using the zope database adapter, and on occasion (1/20)
the following code intermittently throws an exception (1/20 times), even though
the connection is connected. Am I doing something wrong or does someone
know of a bug here? self.connection_base = zapi.getUtility(IZopeDatabaseAdapter,
name) query = "select * from orders where clientid=%s"
% (sqlquote(self.clientid)) print "stateConnected: %d" %
(self.connection_base.isConnected()) result = queryForResults(self.connection_base(),query) Results in the following debug code and exception (copied
straight from my output): stateConnected: 1 ------ 2006-04-14T12:23:43 ERROR ZODB.Connection Shouldn't load
state for 0x01b3 when the connection is closed ------ 2006-04-14T12:23:43 ERROR SiteError [stack trace truncated for brevity] File "/home/stduser/zopeml/lib/python/store/cart/cart.py",
line 152, in __init__ self.loadState() File "/home/stduser/zopeml/lib/python/store/cart/cart.py",
line 196, in loadState result =
queryForResults(self.connection_base(),query) File "/home/stduser/Zope-3.2.0/build/lib.linux-i686-2.4/zope/app/rdb/__init__.py",
line 408, in queryForResults raise DatabaseException(str(error)) DatabaseException: Shouldn't load state for 0x01b3 when the
connection is closed -- David Johnson |
_______________________________________________ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com