db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From T E Schmitz <mail...@numerixtechnology.de>
Subject Re: Specify hostname upon DB connect
Date Wed, 11 Aug 2004 08:51:52 GMT
Hallo Siegfried,
Thank you for your reply.

Göschl,Siegfried wrote:

> Some guess since Torque is a service you would additionaly need:
> 
> +) Torque.shutdown()
> +) Torque.initialize()
> 

The shutdown did it! I had tried Torque.initialize() on its own before - 
to no avail.

Here's an example how to change, for instance, the URL:

Configuration	   config = Torque.getConfiguration();
String key = "dsfactory.mydb.connection.url";
url = StringUtils.replace(url,"$host",host);
config.setProperty(key,url);
url = config.getString(key);							Torque.shutdown();
try
{
     Torque.init(config);
}
catch (Exception e)
{
...
}


Regards/Gruß,

Tarlika Elisabeth Schmitz



> 
> 
> -----Original Message-----
> From: T E Schmitz [mailto:mailreg@numerixtechnology.de] 
> Sent: Mittwoch, 11. August 2004 09:57
> To: torque-user@db.apache.org
> Subject: Re: Specify hostname upon DB connect
> 
> 
> 
> I tried to implement a reconfiguration of Torque at runtime following the advice Guy
Galil kindly provided below.
> 
> I just changed the URL but I didn't manage to get this change to take
> effect:
> 
> Configuration config = Torque.getConfiguration(); config.setProperty(urlKey, newValue);
Torque.setConfiguration(config);
> 
> What do I need to do to get the new config property value to take effect using Torque
3.1?

---------------------------------------------------------------------
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