[Checkins] SVN: Products.SQLAlchemyDA/trunk/README.txt updated

Andreas Jung andreas at andreas-jung.com
Sun May 6 09:28:02 EDT 2007


Log message for revision 75559:
  updated
  

Changed:
  U   Products.SQLAlchemyDA/trunk/README.txt

-=-
Modified: Products.SQLAlchemyDA/trunk/README.txt
===================================================================
--- Products.SQLAlchemyDA/trunk/README.txt	2007-05-06 12:38:41 UTC (rev 75558)
+++ Products.SQLAlchemyDA/trunk/README.txt	2007-05-06 13:28:01 UTC (rev 75559)
@@ -39,10 +39,26 @@
 
        def  initialize(context):
 
-           from z3c.sqlalchemy import createSAWrapper, registerSAWrapper
-           wrapper = createSAWrapper('postgres://user:password@host/database', forZope=True)
-           registerSAWrapper(wrapper, 'my-sa-wrapper')
+           from z3c.sqlalchemy import createSAWrapper
+           wrapper = createSAWrapper('postgres://user:password@host/database', 
+                                     forZope=True,
+                                     name='my-sa-wrapper')
 
+    If you have trouble with the number of connections (5 by default + 10 threshold) you must
+    customize the connection pool:
+
+           from sqlalchemy.pool import QueuePool
+           from z3c.sqlalchemy import createSAWrapper
+
+           wrapper = createSAWrapper('postgres://user:password@host/database', 
+                                     poolclass=QueuePool,
+                                     pool_size=20,
+                                     max_overflow=10,
+                                     forZope=True)
+
+            
+    
+
   - After restarting Zope you go to the ZMI and create an instance of
     "SQLAlchemy Wrapper Integration" (as you would create some DA instance). After
     creating the instance you should see 'my-sa-wrapper' in the properties form of



More information about the Checkins mailing list