Return-Path: Mailing-List: contact torque-user-help@db.apache.org; run by ezmlm Delivered-To: mailing list torque-user@db.apache.org Received: (qmail 96240 invoked from network); 24 Mar 2003 21:34:14 -0000 Received: from mail19a.dulles19-verio.com (161.58.134.133) by daedalus.apache.org with SMTP; 24 Mar 2003 21:34:14 -0000 Received: from www1913.dulles19-verio.com (161.58.134.174) by mail19a.dulles19-verio.com (RS ver 1.0.78vs) with SMTP id 0583661660 for ; Mon, 24 Mar 2003 16:34:23 -0500 (EST) Message-ID: <3E7F79C4.E8A29231@minaret.com> Date: Mon, 24 Mar 2003 13:33:56 -0800 From: Jon King X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: Turbine Torque Users List Subject: Re: access multiple data sources from single app using torque? References: <002701c2eff2$cd08b820$0201a8c0@groni1.gr.nl.home.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Loop-Detect: 1 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Thanks! This is really helpful. Age Mooy wrote: > 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 > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org > For additional commands, e-mail: torque-user-help@db.apache.org