Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[Freeswitch-users] Reuse ODBC connection in javascript


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users
View previous topic :: View next topic  
Author Message
skhanzada at gmail.com
Guest





PostPosted: Fri Jun 05, 2009 3:15 pm    Post subject: [Freeswitch-users] Reuse ODBC connection in javascript Reply with quote

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
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services