Re: Zope database connectivity
Maciej Wisniowski <[email protected]>
| Newsgroups | gmane.comp.web.zope.database |
|---|---|
| Message-ID | <[email protected]> |
> My error was about self.db attribute in > '_v_database_connection' not about '_v_database_connection' > attribute itself. During abort() of this resource manager > self.db was None so self.db.rollback() failed. I'll check > this again... I've messed up things. Error that I've found is in StoredProcedures in DCOracle2 -> SP.py and this issue seems to be specific to DCOracle2 SP class. SP class is ResourceManager that uses self._v_db attribute that is in fact another ResourceManger. When stored procedure in database raises an exception self._v_db attribute of SP class instance disappears (if it was created during same request). As a result "AttributeError: _v_db" is raised when ResourceManager (SP) is being aborted because it tries to call self._v_db.db.rollback(). I'm not sure why DCOracle2 treats SP as another ResourceManager while it still uses same db connection as the other ZSQLs etc. As a result if we have a lot of SP calls during one request there is a lot of commits (rollbacks) to the same db connection. Maybe it's something about caching procedure objects in volatile attributes. -- Maciej Wisniowski