db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guillaume Barre <Guillaume.Ba...@technomedia.ca>
Subject One object model vs multiple database
Date Wed, 02 Apr 2003 18:00:50 GMT
Hi ,

I am trying to use one object model with a various number of databases. My
application can create dynamically new databases

For example I use a Torque.properties file with two DB declarations like
this :

	torque.dsfactory.test1.factory =
org.apache.torque.dsfactory.Jdbc2PoolDataSourceFactory
	torque.dsfactory.test1.pool.defaultMaxActive = 10
	torque.dsfactory.test1.pool.testOnBorrow = true
	torque.dsfactory.test1.pool.validationQuery = SELECT 1

	torque.dsfactory.test2.factory =
org.apache.torque.dsfactory.Jdbc2PoolDataSourceFactory
	torque.dsfactory.test2.pool.defaultMaxActive = 10
	torque.dsfactory.tesy2.pool.testOnBorrow = true
	torque.dsfactory.test2.pool.validationQuery = SELECT 1

	torque.database.test1.adapter = mysql
	torque.dsfactory.test1.connection.driver = org.gjt.mm.mysql.Driver
	torque.dsfactory.test1.connection.url =
jdbc:mysql://127.0.0.1:3306/test1
	torque.dsfactory.test1.connection.user = root
	torque.dsfactory.test1.connection.password = 

	torque.database.test2.adapter = mysql
	torque.dsfactory.test2.connection.driver = org.gjt.mm.mysql.Driver
	torque.dsfactory.test2.connection.url =
jdbc:mysql://127.0.0.1:3306/test2
	torque.dsfactory.test2.connection.user = root
	torque.dsfactory.test2.connection.password = 
	...

My question is how dynamically add a third database without modifying this
file and restart all the application.
I tested using for a second time Torque.init(...) after having changed the
"Configuration" values but without success.

Maybe somebody knows a way to do that?

Thanks



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message