Guy Galil wrote:

What's hardcoded in the base classes is a logical name that points to
settings in Torque.properties - if you have each developer use a
different properties file then they can access different databases.


I have tried to do this, but I got an exception (something about torque.dsfactory...).

Another alternative is to override the hardcoded database name by
specifying a database name on each torque method call, all Torque
methods such as save, doSelect, delete can be called with either a
String database name or a connection object, off-course this might
require massive code changes.


And besides that, we wouldn't be able to commit anything...

The third alternative is to change configuration at run time, I have
code that do this for Torque 3.02 that does not work with newer
versions. 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.


I'de be grateful if you could send me that code. If I manage to get something out of that, I'll let you know ;).

Thanks,
Antonis

PS. This i what I found in a Base*Peer file:

   /** the default database name for this class */
   public static final String DATABASE_NAME = "AdiasBase";

That's why I said that this info is hardcoded...



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  • ... Αντώνης Λεμπέσης
    • ... Guy Galil
      • ... ÎÎÏÏÎÎÏ ÎÎÎÏÎÏÎÏ
    • ... Alvaro Coronel

Reply via email to