[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnue] r7906 - in trunk/gnue-common/src/datasources: . drivers/Base
From: |
johannes |
Subject: |
[gnue] r7906 - in trunk/gnue-common/src/datasources: . drivers/Base |
Date: |
Thu, 15 Sep 2005 06:25:39 -0500 (CDT) |
Author: johannes
Date: 2005-09-15 06:25:34 -0500 (Thu, 15 Sep 2005)
New Revision: 7906
Modified:
trunk/gnue-common/src/datasources/GConnections.py
trunk/gnue-common/src/datasources/drivers/Base/Connection.py
Log:
Let the manager know when a connection has been closed
Modified: trunk/gnue-common/src/datasources/GConnections.py
===================================================================
--- trunk/gnue-common/src/datasources/GConnections.py 2005-09-15 11:10:00 UTC
(rev 7905)
+++ trunk/gnue-common/src/datasources/GConnections.py 2005-09-15 11:25:34 UTC
(rev 7906)
@@ -567,11 +567,21 @@
This function closes all open connections.
"""
- for connection in self.__openConnections.values():
+ for connection in self.__openConnections.values ():
connection.close ()
- if self.__authenticatedUsers.has_key (connection):
- del self.__authenticatedUsers [connection]
- for k in self.__openConnections.keys ():
- del self.__openConnections [k]
+
+ # ---------------------------------------------------------------------------
+ # After a connection has been closed, remove all references to it
+ # ---------------------------------------------------------------------------
+
+ def _connectionClosed (self, connection):
+
+ print "removing connection:", connection
+ if connection in self.__authenticatedUsers:
+ del self.__authenticatedUsers [connection]
+
+ for (key, value) in self.__openConnections.items ():
+ if value == connection:
+ del self.__openConnections [key]
Modified: trunk/gnue-common/src/datasources/drivers/Base/Connection.py
===================================================================
--- trunk/gnue-common/src/datasources/drivers/Base/Connection.py
2005-09-15 11:10:00 UTC (rev 7905)
+++ trunk/gnue-common/src/datasources/drivers/Base/Connection.py
2005-09-15 11:25:34 UTC (rev 7906)
@@ -416,6 +416,7 @@
assert gEnter (8)
self._close_ ()
+ self.manager._connectionClosed (self)
gLeave (8)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnue] r7906 - in trunk/gnue-common/src/datasources: . drivers/Base,
johannes <=