[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
r5074 - in trunk/gnue-common/src/datasources: . drivers/DBSIG2
From: |
jan |
Subject: |
r5074 - in trunk/gnue-common/src/datasources: . drivers/DBSIG2 |
Date: |
Fri, 6 Feb 2004 09:16:45 -0600 (CST) |
Author: jan
Date: 2004-02-06 09:16:44 -0600 (Fri, 06 Feb 2004)
New Revision: 5074
Modified:
trunk/gnue-common/src/datasources/GConnections.py
trunk/gnue-common/src/datasources/drivers/DBSIG2/Connection.py
Log:
- implement close function for all DBSIG2 drivers
- add function to close all open connections of a connection pool
(GConnection.py)
Modified: trunk/gnue-common/src/datasources/GConnections.py
===================================================================
--- trunk/gnue-common/src/datasources/GConnections.py 2004-02-06 14:21:17 UTC
(rev 5073)
+++ trunk/gnue-common/src/datasources/GConnections.py 2004-02-06 15:16:44 UTC
(rev 5074)
@@ -454,9 +454,21 @@
return self._authenticatedUsers[connection]
except (KeyError, IndexError):
return None
+
+
+ def closeAll(self):
+ """
+ This function closes all open connections.
+ """
+ for connection in self._openConnections:
+ try:
+ self._openConnections[connection].close()
+ except Error:
+ pass
+
+ self._openConnections = {}
-
#
# Load the correct DBdriver from gnue/common/datasources/drivers/*/
#
Modified: trunk/gnue-common/src/datasources/drivers/DBSIG2/Connection.py
===================================================================
--- trunk/gnue-common/src/datasources/drivers/DBSIG2/Connection.py
2004-02-06 14:21:17 UTC (rev 5073)
+++ trunk/gnue-common/src/datasources/drivers/DBSIG2/Connection.py
2004-02-06 15:16:44 UTC (rev 5074)
@@ -66,10 +66,18 @@
self._beginTransaction()
-
- # Code necessary to force the connection into transaction mode...
- # this is usually not necessary (MySQL is one of few DBs that must force)
+ def close(self):
+ """
+ Close the DBSIG2 Connection.
+ """
+ self.native.close()
+
+
def _beginTransaction(self):
+ """
+ Code necessary to force the connection into transaction mode...
+ this is usually not necessary (MySQL is one of few DBs that must force)
+ """
pass
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- r5074 - in trunk/gnue-common/src/datasources: . drivers/DBSIG2,
jan <=