server/session.py
changeset 5920 6c0a7a881024
parent 5894 7510cc3bbdbb
parent 5906 d40ced753291
child 6013 8ca424bc393b
child 6028 c83167d1b040
--- a/server/session.py	Wed Jul 07 13:01:25 2010 +0200
+++ b/server/session.py	Wed Jul 07 13:01:44 2010 +0200
@@ -1025,6 +1025,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