db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Saravana Kannan <skka...@engr.uky.edu>
Subject RE: Multiple databases without JNDI ?
Date Tue, 27 Apr 2004 16:34:18 GMT
Hi.

 I don't remember exactly what to use... but I know 
that you should use a object.save(connection) or 
object.save("database name"). It's either one of these.
.. check out the Torque API page. Google it if u cant 
find it.

~Sarav

-- 
There are 10 kinds of people in the world,
those who know binary and those who don't.


Quoting Jeff Rasmussen <jrasmussen@lnxi.com>:

> How do you access the different DB's with this method?
> 
> Do you just init torque and call object.save()?
> 
> Is there anything special that needs to be done or does Torque
> automatically know what DB to save to?
> 
> Thanks, 
> Jeff Rasmussen
> 
> 
> 
> 
> On Wed, 2004-03-17 at 11:14, Benjamin Yu wrote:
> > Yes, it is possible. Just enter multiple dsfactory entries into the
> > *runtime* Torque.properties file.
> > 
> > Something like:
> > 
> > torque.database.default=db1
> > 
> > torque.database.db1.adapter=postgresql
> >
> torque.dsfactory.db1.factory=org.apache.torque.dsfactory.SharedPoolDataSourc
> > eFactory
> > torque.dsfactory.db1.pool.maxActive=10
> > torque.dsfactory.db1.pool.testOnBorrow=true
> > torque.dsfactory.db1.pool.validationQuery=SELECT 1
> > torque.dsfactory.db1.connection.driver=org.postgresql.Driver
> > torque.dsfactory.db1.connection.url=jdbc:postgresql://localhost/db2
> > torque.dsfactory.db1.connection.user=user1
> > torque.dsfactory.db1.connection.password=pw1
> > 
> > torque.database.db2.adapter=postgresql
> >
> torque.dsfactory.db2.factory=org.apache.torque.dsfactory.SharedPoolDataSourc
> > eFactory
> > torque.dsfactory.db2.pool.maxActive=10
> > torque.dsfactory.db2.pool.testOnBorrow=true
> > torque.dsfactory.db2.pool.validationQuery=SELECT 1
> > torque.dsfactory.db2.connection.driver=org.postgresql.Driver
> > torque.dsfactory.db2.connection.url=jdbc:postgresql://localhost/db1
> > torque.dsfactory.db2.connection.user=user2
> > torque.dsfactory.db2.connection.password=pw2
> > 
> > 
> > -----Original Message-----
> > From: Bogdan Vatkov [mailto:bvatkov@globaltech-bg.com]
> > Sent: Wednesday, March 17, 2004 10:10 AM
> > To: TORQUE_LIST
> > Subject: Multiple databases without JNDI ?
> > 
> > 
> > Hi guys,
> > Is it possible to configure multiple databases without using JNDI ?
> > If yes how the build.properties will look like ?
> > 
> > regards,
> > bogdan
> > 
> > ---------------------------------------------------------------------
> > 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
> 
> 


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