Please login or register to access secure site features.

Note: By continuing to use DevConnect Program Services you agree to our latest Registered Member Terms.

Sign in using DevConnect ID

Forgot password?

Trouble logging in?

Submit a ticket for Registration Support.

I have an SSO ID

?
sign in

Don't have a DevConnect or SSO ID ?

Create a DevConnect account or join the program.

register now
^
Forum Index » Avaya Orchestration Designer » How to correctly set database connection URL in runtime   XML
 
Author Message
VasilyL



Joined: 11/07/2016 10:49:24
Messages: 191
Online

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: 06/11/2013 14:29:24
Messages: 3860
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: 11/07/2016 10:49:24
Messages: 191
Online

How to do it in the best way?

I really do not want to recompile and redeliver IVR app every week.
WilsonYu



Joined: 06/11/2013 14:29:24
Messages: 3860
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: 11/07/2016 10:49:24
Messages: 191
Online

Hi!

Thanks a lot! It is clear now!
VasilyL



Joined: 11/07/2016 10:49:24
Messages: 191
Online

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: 06/11/2013 14:29:24
Messages: 3860
Offline

That should work.
VasilyL



Joined: 11/07/2016 10:49:24
Messages: 191
Online

Thanks for your opinion!
 
 
Go to: