db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Helge Weissig <hel...@grajagan.org>
Subject using a second database
Date Wed, 12 Apr 2006 15:44:52 GMT
Hi,

	I am trying to use a second database but am having trouble accessing  
it (or configuring it, not sure). Below is what I have so far, most  
of it taken straight from the 3.2 distribution. When I ask Torque to  
give me a connection to "oracle", I get the mysql db connection.

Also and unrelated, I use the generator to create the mysql DB and it  
seems that I need to use the same name in my DB schema as I do in the  
Torque.properties file for runtime. Is that correct? Is there a way  
around it? Having a group of developers develop on their own sandbox  
dbs and then switching the code to production would be a little  
easier if one would only have to change that DB name in one place and  
not in two and on several lines...

thanks so much for any insight!!
h.

# defaults
torque.applicationRoot = ${applicationRoot}		# do I need this one???
torque.defaults.pool.maxWait = 10000
torque.defaults.pool.maxIdle = 8
torque.defaults.pool.maxActive = 10
torque.defaults.pool.timeBetweenEvictionRunsMillis= 300000
torque.defaults.pool.minEvictableIdleTimeMillis = 3600000
torque.defaults.connection.driver = com.mysql.jdbc.Driver
torque.defaults.connection.url = jdbc:mysql://localhost:3306/test
torque.defaults.connection.user = <user1>
torque.defaults.connection.password = <password1>

# first DB, works like a charm
torque.database.default=test
torque.database.test.adapter=mysql
torque.dsfactory.test.factory=org.apache.torque.dsfactory.SharedPoolData 
SourceFactory
torque.dsfactory.test.pool.maxIdle=8
torque.dsfactory.test.pool.maxActive=10
torque.dsfactory.test.pool.testOnBorrow=true
torque.dsfactory.test.pool.validationQuery=SELECT 1
torque.dsfactory.test.connection.driver = com.mysql.jdbc.Driver
torque.dsfactory.test.connection.url = jdbc:mysql://localhost:3306/test
torque.dsfactory.test.connection.user = <user1>
torque.dsfactory.test.connection.password = <password1>

# second DB
torque.database.oracle.adapter=oracle
torque.dsfactory.oracle.factory=org.apache.torque.dsfactory.SharedPoolDa 
taSourceFactory
torque.dsfactory.oracle.pool.maxIdle=8
torque.dsfactory.oracle.pool.maxActive=10
torque.dsfactory.oracle.pool.testOnBorrow=true
torque.dsfactory.oracle.pool.validationQuery=SELECT 1
torque.database.oracle.driver=oracle.jdbc.driver.OracleDriver
torque.database.oracle.url=jdbc:oracle:thin:@sunfire:1521:actx
torque.database.oracle.username=<user2>
torque.database.oracle.password=<password2>
torque.database.oracle.maxConnections=4
torque.database.oracle.expiryTime=3600000

torque.idbroker.clever.quantity=true
torque.manager.useCache = true




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