Index: SessionDataContainer.py =================================================================== RCS file: /cvs-repository/Packages/Products/CoreSessionTracking/SessionDataContainer.py,v retrieving revision 1.29 diff -r1.29 SessionDataContainer.py 241c241 < --- > 249,250c249,250 < return self._getContainer(parentpath, timeout).__of__(parent) < --- > return self._getContainer(parent, timeout).__of__(parent) > 261,262c261,265 < < def _getConnection(self, parentpath): --- > > def _getConnection(self, parent): > db = self._v_db > if db is None: > db = self._getDB(self._v_parentpath) 264,269c267,272 < if not conn: < db = self._v_db < if db is None: < db = self._getDB(parentpath) < self._v_conn = db.open() # no versioning < return self._v_conn --- > if conn is None: > conn = self._v_conn = db.open() # no versioning > # if we don't have a jar yet, we steal our parent's > jar = self._p_jar or parent._p_jar > jar.onCloseCallback(ConnectionCloser(self, conn)) > return conn 271,272c274,275 < def _getContainer(self, parentpath, timeout): < conn = self._getConnection(parentpath) --- > def _getContainer(self, parent, timeout): > conn = self._getConnection(parent) 280c283 < --- > 291a295,314 > class ConnectionCloser: > def __init__(self, mount, conn): > self.mount = mount > self.conn = conn > > def __call__(self): > """ This is called by the 'parent' connection's onCloseCallback > handler, so that our 'spawned' connection will be closed when > our parent connection is closed. """ > # grab a ref > conn = self.conn > if conn is not None: > # Delete the parent's cached connection and our ref to mount. > self.mount._v_conn = None > # Remove circular reference. > self.conn = None > del self.conn > # Close the child connection. > conn.close() >