[Freeswitch-users] Reuse ODBC connection in javascript

Shoaib Khanzada skhanzada at gmail.com
Fri Jun 5 13:09:54 PDT 2009


Hi,



I want to reuse database connection (mysql) in one of my javascript which is
executed on each call. Following is how I am creating ODBC connection.



Line1) var db = new ODBC(DSN, DB_USER, DB_PASS);

Line2) db.connect();



My first question is, where does it create a database connection on line1 or
on line2?



Secondly, how can I reuse this connection? so that it is not created for
each call and I just use a previously created <code>db</code> object in my
routing script.



My Objective is:



1)      Create ODBC connection on freeswitch startup (could be a database
connection pool)

2)      Reuse the connection on each call

3)      Close database connection on freeswitch shutdown (or on some other
event)



Any help would be highly appreciated.


Shoaib
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090606/431b0b94/attachment-0002.html 


More information about the FreeSWITCH-users mailing list