Re: Programatically set torque.dsfactory.<MY_BASE>.connection.url

Shinkan <[email protected]>
Newsgroups gmane.comp.jakarta.turbine.torque.user
Message-ID <[email protected]>
Hi everyone.

Thanks to your pointers, I've found how to proceed. This is what I do :

You have to load "manually" your Torque properties file instead of
deleguating this to Torque.init( String filePath ).
  - Create a PropertiesConfiguration : PropertiesConfiguration torqueConf =
new PropertiesConfiguration();
  - Load the .properties file :
torqueConf.load(PSCDataControl.class.getResourceAsStream(_torqueProperties));
  - Add the properties you don't have to store in your configuration file :
    torqueConf.addProperty(_torqueConnectUrlProperty, PSCSGBD.CONNECT);
  - Then, use the Torque.init( Configuration conf ) method :
Torque.init(torqueConf);
  - You can check good ignition by calling Torque.isInit().

Have a good day !

-- 
Pierre.
Some people, when confronted with a problem, think "I know, I'll use XML".
Now they have two problems. -- Jamie Zawinski / James Robertson
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.