This content has been marked as final. Show 2 replies
Cx_Oracle has session pooling:
import cx_OracleIf you link Python with Oracle 11g libraries and connect to an Oracle 11g database you can also use "Database Resident Connection Pooling (DRCP)" by adding "pooled" to the connection string:
pool = cx_Oracle.SessionPool(user='hr',password='hrpwd',dsn='localhost/orcl',min=1,max=2,increment=1)
db = pool.acquire()
cursor = db.cursor()
cursor.arraysize = 50
for city in cursor.fetchall():
print "Values:", city
pool = cx_Oracle.SessionPool(user='hr',password='hrpwd',dsn='localhost/orcl:pooled',min=1,max=2,increment=1)
Thanks for the reply.
I am aware of the SessionPool functionality provided via cx_Oracle but what I was looking for was some guidance on how to implement with mod_python and Apache.
Specifically, can I keep the connection pool around between requests that are sent to the web server?
Appreciate any input.