db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoff Fortytwo <...@ign.com>
Subject Re: How to initialize and shutdown Torque without a properties-file
Date Wed, 30 Apr 2003 20:21:26 GMT
BaseConfiguration torqueConfig = new BaseConfiguration();
torqueConfig.addProperty("log4j.rootCategory","DEBUG,default");
torqueConfig.addProperty("log4j.appender.default","org.apache.log4j.FileAppender"); 

torqueConfig.addProperty("log4j.appender.default.file","/jrun/logs/default/torque.log"); 

torqueConfig.addProperty("log4j.appender.default.layout","org.apache.log4j.SimpleLayout");
torqueConfig.addProperty("torque.database.default","FAKE");
torqueConfig.addProperty("torque.database.rego.driver","oracle.jdbc.driver.OracleDriver");


torqueConfig.addProperty("torque.database.rego.url","FAKE");
torqueConfig.addProperty("torque.database.rego.username","FAKE");
torqueConfig.addProperty("torque.database.rego.password","FAKE");
org.apache.torque.Torque.init(torqueConfig);


At 08:21 PM 4/29/2003, you wrote:
>Hi,
>
>is there any way to...
>
>- initialize Torque without providing a file with all the properties (as in
>Torque.properties)?
>I have to let the user specify the database settings during runtime of my
>application and so I have to pass the values on to Torque somehow.
>
>- shuting down Torque properly?
>The user shall be able to change the database he/she works on during runtime,
>so I have to be able to shut Torque down and initialize it again. I tried the
>Torque.shutdown() method but it does not seem to shutdown Torque properly. I
>one calls Torque.isInit() after calling Torque.shutdown() Torque still seems
>to be initialized.
>
>Thanks for support.
>Malte.
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
>For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message