I know you posted something about it, but I was unable to retrieve the
thread.
What I tried to do was also:
Configuration torqueconf = Torque.getConfiguration();
torqueconf.setProperty("torque.dsfactory.mydb.connection.url",
newproperties.get("torque.dsfactory.mydb.connection.url"));
torqueconf.setProperty("torque.dsfactory.customer.connection.user",
newproperties.get("torque.dsfactory.customer.connection.user"));
torqueconf.setProperty("torque.dsfactory.customer.connection.password",
newproperties.get("torque.dsfactory.customer.connection.password"));
Torque.setConfiguration(torqueconf);
Torque.getInstance().shutdown(); // with or without
Torque.getInstance().init(ConfigurationConverter.getConfiguration(properties));
But this led me to the a Nullpointer (db =
Torque.getDB(criteria.getDbName()) is null) if the shutdown is present,
and to contacting the wrong DB is the shutdown is not present.
Could you re-post your solution?
Guy Galil wrote:
It depends on the version of Torque you use.
I posted a solution for Torque 3.02 a while ago, The idea is to get the
Configuration object, change some
settings and reconfigure Torque.
It requires some digging into the Torque code but is doable.
I can provide the 3.02 code if you want but I know those things changed
since that version.
On Mon, 2005-05-23 at 18:55 +0200, Lionel Pasquier wrote:
Hello,
I 've read a few threads on this mailing list about the problem of
changing of database configuration using:
Torque.init(pathToConf);
Torque.shutdown();
Torque.init(newPathOfConf);
Unfortunatly I still have the classic NullpointerException at any torque
access after the 2nd init.
Has anyone solved this problem and knows a workaround?
Lionel
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]