db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Age Mooy" <am...@home.nl>
Subject RE: access multiple data sources from single app using torque?
Date Fri, 21 Mar 2003 21:42:41 GMT

Hmmm... as usual my attachment (< 4k) was killed by the list :(
You'll have to work with the list-garbled raw data then... here it is:

Age

# -------------------------------------------------------------------
#
#  T O R Q U E  P R O P E R T I E S
#
# -------------------------------------------------------------------
# This is the configuration file for Torque.
#
# Note that strings containing "," (comma) characters must backslash
# escape the comma (i.e. '\,')
#
# These are your database settings. Look in the
# org.apache.torque.pool.* packages for more information.
#
# The parameters to connect to the default database.  You MUST
# configure these properly.
# -------------------------------------------------------------------

torque.applicationRoot = .


# -------------------------------------------------------------------
# Databases
# -------------------------------------------------------------------

torque.database.default = default


# -------------------------------------------------------------------
# Database Pools
# -------------------------------------------------------------------

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

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

# -------------------------------------------------------------------
# Data Sources
# -------------------------------------------------------------------

torque.database.default.adapter = mysql
torque.dsfactory.default.connection.driver = org.gjt.mm.mysql.Driver
torque.dsfactory.default.connection.url =
jdbc:mysql://localhost:3306/myapp
torque.dsfactory.default.connection.user = myapp
torque.dsfactory.default.connection.password = myapp

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

# -------------------------------------------------------------------
# Misc Properties
# -------------------------------------------------------------------

# Determines if the quantity column of the IDBroker's id_table should
# be increased automatically if requests for ids reaches a high
# volume.

torque.idbroker.cleverquantity = true

# Determines whether the managers cache instances of the business
objects.
# And also whether the MethodResultCache will really cache results.

torque.manager.useCache = false



> See the attached Torque.properties file. It has two 
> datasources configured, both with a datasource factory, an 
> adapter, a pool, and a connection. In your schema you can use 
> the database name attribute to specify to which datasource 
> that database belongs.
> 
> I have one schema for my security database, and a couple of 
> other schemas that use the default database.
> 
> Age
> 
> > -----Original Message-----
> > From: Jon King [mailto:jon@minaret.com]
> > Sent: Friday, March 21, 2003 19:57
> > To: torque-user@db.apache.org
> > Subject: access multiple data sources from single app using torque?
> > 
> > 
> > I'm like to be able to generate 2 separate object models
> > (from two different relation data sources) and then access 
> > both object models from a single application.  Is this 
> > possible with torque?  At first blush, it seems that multiple 
> > data sources can't be configured in Torque.properties.  Thanks.
> > 
> > Jon King
> > jon@minaret.com
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > 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