Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Dynamic DB instance change at runtime

    Hello,

    I am using SmartGWT Pro 3.0.1.

    In my application, I want to make administrator able to change the database instance (hostname, portname, userid, pwd) run time using the UI named as DatabaseSetup.

    I have gone through many post and came to conclusion that i have to change the Config property names like, Config.getGlobal().put("sql.PostgreSQL.driver.serverName", "testserver");

    When i write above line, on the Loadstartup servlet it works fine but as per my requirement i want to change the db instance after the UI had been loaded so i tried to fire "Config.getGlobal().put("sql.PostgreSQL.driver.serverName", "testserver");" from the server on the save button click of DatabaseSetup form.

    And after this i had checked whether above line took effect or not via,
    Config.getGlobal().asProperties()

    I see that sql.PostgreSQL.driver.serverName propery been changed to "testserver", but when i am trying to access the application i see application is still accessing the old server only.

    Can you please let me know what is getting wrong here?

    Thanks.
Working...
X