You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Ender KILICOGLU <en...@kilicoglu.nom.tr> on 2002/11/18 20:18:23 UTC

using secondary db

Hi all
May be somebody asked for it  but. I couldnt find anything. I added
another db connection to torque.properties. But how I will use it? 
 
for example I added some table structure and created some OM and Peer's
for new db. still use old hypersonic turbine and new db is mysql. So
everythings okay for build process but at runtime I couldnt find any
method to call new db or to force new connection to be used for some OM.
 
Ender
 

RE: using secondary db

Posted by David Sean Taylor <da...@bluesunrise.com>.

> -----Original Message-----
> From: Ender KILICOGLU [mailto:ender@kilicoglu.nom.tr]
> Sent: Monday, November 18, 2002 11:18 AM
> To: jetspeed-user@jakarta.apache.org
> Subject: using secondary db
>
>
> Hi all
> May be somebody asked for it  but. I couldnt find anything. I added
> another db connection to torque.properties. But how I will use it?
>
> for example I added some table structure and created some OM and Peer's
> for new db. still use old hypersonic turbine and new db is mysql. So
> everythings okay for build process but at runtime I couldnt find any
> method to call new db or to force new connection to be used for some OM.

Hi Ender,

Here is one way to configure a second database connection pool in the
Torque.properties. It is named 'ender':

torque.database.ender.adapter=oracle
torque.dsfactory.ender.connection.driver = oracle.jdbc.driver.OracleDriver
torque.dsfactory.ender.connection.url =
jdbc:oracle:thin:@yourSid:1521:yourSchema
torque.dsfactory.ender.connection.user =  jetspeed
torque.dsfactory.ender.connection.password = password
torque.dsfactory.ender.factory=org.apache.torque.dsfactory.TorqueDataSourceF
actory
torque.dsfactory.ender.pool.defaultMaxConnections=10
torque.dsfactory.ender.pool.maxExpiryTime=3600
torque.dsfactory.ender.pool.connectionWaitTimeout=10

To use this connection pool with a set of Torque OM classes:

<database name="ender">

To use this connection pool in the DatabaseBrowserPortlet, specify it by
name:

        <!-- to use an alternate torque pool, set this parameter -->
        <parameter name="poolname" value="ender" hidden="false"/>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: using secondary db

Posted by Stefaan <sn...@phreaker.net>.
The BasePeer methods all come with a parameter for specifying the connection
to use don't they?
Stefaan

> -----Original Message-----
> From: Ender KILICOGLU [mailto:ender@kilicoglu.nom.tr]
> Sent: maandag 18 november 2002 20:18
> To: jetspeed-user@jakarta.apache.org
> Subject: using secondary db
>
>
> Hi all
> May be somebody asked for it  but. I couldnt find anything. I added
> another db connection to torque.properties. But how I will use it?
>
> for example I added some table structure and created some OM and Peer's
> for new db. still use old hypersonic turbine and new db is mysql. So
> everythings okay for build process but at runtime I couldnt find any
> method to call new db or to force new connection to be used for some OM.
>
> Ender
>
>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>