Author Message
VasilyL
Joined: Jul 11, 2016
Messages: 230
Offline
Hi Guys!

We have IVR application project with Database Connector.
It works fine.
But customer does something with it's own environment and changes database location to frequently.

I want to let the customer to set database URL in Configuration parameters. So, at connect time just read configuration variable and use it instead of the one which was set ( in Pluggable Connector -> Database Configuration -> JDBC Data Sources).

How to correctly set the database connection URL at runtime?

Will it be correct to add java code in db operation java class in constructor method, after tag
//}}END:CLASS:CONSTRUCTOR
?

For example,
ConnectionProperties props = getConnectionProperties();
props.setUrl("customerURL");

Will it be enough?

And another question is how to configure failover path for a database connection at runtime?

Thanks in advance for your help!
Vasily.
WilsonYu
Joined: Nov 6, 2013
Messages: 3950
Offline
I don't recommend you to create connections programmatically like that. That way, you would not take advantage of connection pooling feature of the app server.
There is a Failover button on the Database Configuration section of the Property dialog (via Properties/Orchestration Designer/Pluggable Connectors)
VasilyL
Joined: Jul 11, 2016
Messages: 230
Offline
How to do it in the best way?

I really do not want to recompile and redeliver IVR app every week.
WilsonYu
Joined: Nov 6, 2013
Messages: 3950
Offline
The connection string can be configured on the app server. In case of Tomcat, you just need to modify the config/catalina/localhost/<app>.xml context file.
VasilyL
Joined: Jul 11, 2016
Messages: 230
Offline
Hi!

Thanks a lot! It is clear now!
VasilyL
Joined: Jul 11, 2016
Messages: 230
Offline
Hello,
Can you please tell me what do you think about the following proposal?
I know it is not a fresh idea, but would like to know you professional opinion.

In OD Database Connector we change IP address to DNS name.
On all AppServers modify hosts file (or something like that) to resolve DNS name.
No need to modify config/catalina/localhost/<app>.xml. No need to rebuild OD app at all.

What do you think?

Thanks in advance!
WilsonYu
Joined: Nov 6, 2013
Messages: 3950
Offline
That should work.
VasilyL
Joined: Jul 11, 2016
Messages: 230
Offline
Thanks for your opinion!
Go to:   
Mobile view