Commit 90e30f6b authored by Shane Hathaway's avatar Shane Hathaway

Made it possible to use a different DB class by extending ZopeDatabase.

Also set the connection class only when specified.
parent 9c4eb269
......@@ -158,10 +158,15 @@ class ZopeDatabase(ZODBDatabase):
container_class = 'OFS.Folder.Folder'
def createDB(self):
return ZODBDatabase.open(self)
def open(self):
DB = ZODBDatabase.open(self)
# set the connection class
DB.klass = self.config.connection_class
DB = self.createDB()
if self.config.connection_class:
# set the connection class
DB.klass = self.config.connection_class
print DB, DB.klass
if self.config.class_factory is not None:
DB.setClassFactory(self.config.class_factory)
from ZODB.ActivityMonitor import ActivityMonitor
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment