Page 1 of 1

Possible to connect solution to Db in a different URL?

PostPosted: Sun Aug 05, 2012 11:24 am
by cuoredisardegna@tiscali.i
Hi to Everyone,
could Someone tell if:
it is possible to connect a solution to a Datatbase Server in a different URL?

Example:
You suppose that You have Your solution on URL 79.5.123.154 in the server user_data. The Database Server URL is configured :

Database Server URL:jdbc:postgresql://localhost:5432/user_data

Now You suppose that You want to connect Your solution to the server user_data in another machine : URL 79.5.123.180.
How to configure The Database Server URL?

Tanks in advance.
Gianni Pinna.

Re: Possible to connect solution to Db in a different URL?

PostPosted: Sun Aug 05, 2012 8:28 pm
by Harjo
you can add both Url's to the app-server or developer and than use the databaseManager switch option, to switch between them

Re: Possible to connect solution to Db in a different URL?

PostPosted: Mon Aug 06, 2012 9:55 am
by omar
So that would be:

Code: Select all
var success = databaseManager.switchServer('connection1', 'connection2')


But both connections will have to be accessible for this to work properly.

Re: Possible to connect solution to Db in a different URL?

PostPosted: Mon Aug 06, 2012 11:03 am
by cuoredisardegna@tiscali.i
Hi Harjo , Hi Omar,

Tank You very much, for Your replays.
Excuse, for the need of steps in understanding. Hope You could be patient.

1st sep.

Harjo wrote:

Code: Select all
you can add both Url's to the app-server or developer and than use the databaseManager switch option, to switch between them


WHERE both Urls have to been added:
-in whath mask
-in wath machine: that one with ip 79.5.123.154 or thath one with the ip 79.5.123.180?

HOW both Url's have to been attached: could You write a line for example?

Tanks in advance.
Gianni Pinna.

Re: Possible to connect solution to Db in a different URL?

PostPosted: Mon Aug 06, 2012 2:11 pm
by Harjo
No we are talking here about 2 database servers! not two application-servers.

so you have one (servoy) application-server with a localhost database, right?
so you create a database connection, to the localhost database
and you create a database connection to the other database on the other ip-adres.

database connection can be made in developer and they end up in the servoy.properties file.