Hi Ibrahim,
since cx_Oracle is DB API compliant, it should work with DBPool.py.
The problem in your code is that you instantiate DBPool for every
connection you want to make. You should only intantiate it once:
import cx_Oracle
from MiscUtils.DBPool import DBPool
dbPool = DBPool(cx_Oracle, 5,
user='B2MSYS', password='B2MSYS', dsn='DUNYA_SRV')
You can do this, for instance, as initialization code of your module or
your class "SitePage" (not in the __init__ method of the SitePage!), so
it is only executed once.
Then, for instance in the __init__ method of your servlet, you get a
connection with db = dbPool.getConnection().
In the case of cx_Oracle, you may also consider using SessionPool, which
is already a part of cx_Oracle.
Greetings
Christoph
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss