[Zope-Checkins] CVS: Products/DCOracle2 - DABase.py:1.7.2.3
Chris Withers
chris at simplistix.co.uk
Wed Feb 25 19:42:06 EST 2004
Update of /cvs-repository/Products/DCOracle2
In directory cvs.zope.org:/tmp/cvs-serv14119
Modified Files:
Tag: chrisw_fixconnectionleak_branch
DABase.py
Log Message:
Change manage_open_connection and connected implementation.
=== Products/DCOracle2/DABase.py 1.7.2.2 => 1.7.2.3 ===
--- Products/DCOracle2/DABase.py:1.7.2.2 Wed Feb 25 18:17:38 2004
+++ Products/DCOracle2/DABase.py Wed Feb 25 19:42:05 2004
@@ -121,6 +121,14 @@
return result
+ def manage_open_connection(self,REQUEST=None):
+ """Open one connection"""
+ self.connect(self.connection_string)
+ # open at least one connection
+ self._v_database_connection.getDB()
+ # return as normal
+ return self.manage_main(self, REQUEST)
+
def manage_close_connection(self,REQUEST=None):
"""Close all connections for our connection string"""
# do the normal stuff
@@ -133,6 +141,11 @@
if REQUEST is not None:
return self.manage_main(self, REQUEST)
+
+ def connected(self):
+ """Needed because we should appear as connected
+ even if only one Zope thread has _v_connected set"""
+ return connections.countConnections(self.connection_string)
def edit(self, title, connection_string, check=1):
# release our connection if we have one
More information about the Zope-Checkins
mailing list