server/session.py
branchstable
changeset 5906 d40ced753291
parent 5826 462435bf5457
child 5920 6c0a7a881024
--- a/server/session.py	Tue Jul 06 13:54:57 2010 +0200
+++ b/server/session.py	Tue Jul 06 17:09:14 2010 +0200
@@ -1031,6 +1031,14 @@
         self.cnxtype = 'inmemory'
         self.disable_hook_categories('integrity')
 
+    @property
+    def pool(self):
+        """connections pool, set according to transaction mode for each query"""
+        if self.repo.shutting_down:
+            self.reset_pool(True)
+            raise Exception('repository is shutting down')
+        return getattr(self._threaddata, 'pool', None)
+
 
 class InternalManager(object):
     """a manager user with all access rights used internally for task such as