db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guy Galil" <Guy_Ga...@guardium.com>
Subject Re: Does torque support multiple databases?
Date Tue, 24 Jan 2006 20:36:13 GMT
It does.
The database element in the schema xml refers to a set of properties in
Torque.properties
For instance 
<database
  name="some_db"
  defaultIdMethod="native"
  defaultJavaNamingMethod="underscore"> 

...

refers to :
torque.database.some_db.adapter=mysql
torque.dsfactory.some_db.factory=org.apache.torque.dsfactory.Jdbc2PoolDataSourceFactory
#torque.dsfactory.some_db.factory=org.apache.torque.dsfactory.TorqueDataSourceFactory
torque.dsfactory.some_db.pool.defaultMaxActive=30
torque.dsfactory.some_db.pool.testOnBorrow=true
torque.dsfactory.some_db.pool.validationQuery=SELECT 1
torque.dsfactory.some_db.connection.driver=org.gjt.mm.mysql.Driver
torque.dsfactory.some_db.connection.url =jdbc:mysql://127.0.0.1/DATABASE
torque.dsfactory.some_db.connection.user = user
torque.dsfactory.some_db.connection.password = password
#torque.dsfactory.some_db.pool.defaultMaxConnections=30
#torque.dsfactory.some_db.pool.maxExpiryTime=3600
#torque.dsfactory.some_db.pool.connectionWaitTimeout=10 

you can have multiple schema xml files and multiple entries in your
Torque.properties


On Tue, 2006-01-24 at 11:49 -0800, David Zhao wrote:
> Hi there,
> 
> Does torque support multiple database schemas? either with the same database
> engines or different ones?
> Thanks,
> 
> David


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