You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by Guy Galil <Gu...@guardium.com> on 2006/02/02 16:42:41 UTC

[Fwd: Re: DB user name and password]


The Torque class has another init method that gets an
org.apache.commons.configuration.Configuration as a parameter.
You can instantiate a Configuration object from your Torque.properties
file :
Configuration c = (Configuration)
                    new PropertiesConfiguration(configFile);
and then modify this Configuration object before you ues it to initiate
Torque.

 On Wed, 2006-02-01 at 18:37 -0800, Alex Chen wrote:
> Currently the only way I know is to specify the user name and password 
> for DB connection via torque is through a property file:
> 
> torque.defaults.connection.user = dbuser
> torque.defaults.connection.password = dbpassword
> 
> and then call Torque.init( String propertyFile)
> 
> This is open the chance of someone looking at the file and getting 
> access to the DB.
> 
> Is there other way to initialize Torque so that I can set the DB 
> user/password separately, e.g. via some property setting at runtime?
> 
> Alex
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org