web stats
Don't wont to hardcode the database connection - Page 2 - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #11  
Old 07-14-2010, 02:11 PM
Benzo Benzo is offline
OBX.1 Kenobi
 
Join Date: May 2010
Location: Québec Canada
Posts: 35
Benzo is on a distinguished road
Thumbs up

This is what i have done with the help of all of you

In the deployed script of the Master Chanel i have write this code
Code:
globalMap.put("FbDriver",'org.firebirdsql.jdbc.FBDriver');
globalMap.put("FbUrl",'jdbc:firebirdsql:127.0.0.1:C:\\xxxx\\yyyy\\MIRTH.FDB');
globalMap.put("FbUsername",'XYXYXY');
globalMap.put("FbPw",'xyxyxyx');
like mourisj wrote

For the rest, the channel is just a Javascript Reader on the source side and Javascript writer as a destination.

The code on both ends is quite complex:
Code:
return;
and in each place where i need a conenction i have this code
Code:
var dbConn = DatabaseConnectionFactory.createDatabaseConnection(globalMap.get('FbDriver'),globalMap.get('FbUrl'),globalMap.get('FbUsername'),globalMap.get('FbPw'));
If it can help somebody

Thank again for your help
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 01:44 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Mirth Corporation