I've done it this way successfully:

### start torque.properties file:
torque.database.default=default
torque.database.default.adapter=mssql

### Jetspeed Microsoft SQL
torque.dsfactory.default.connection.driver =
com.microsoft.jdbc.sqlserver.SQLServerDriver
torque.dsfactory.default.connection.url =
jdbc:microsoft:sqlserver://<servername1>:1433;databaseName=<dbName1>;SelectM
ethod=cursor
torque.dsfactory.default.connection.user =  <username1>
torque.dsfactory.default.connection.password = <password1>
torque.dsfactory.default.factory=org.apache.torque.dsfactory.TorqueDataSourc
eFactory
# The number of database connections to cache per ConnectionPool instance
(specified per database)
torque.dsfactory.default.pool.defaultMaxConnections=10
torque.dsfactory.default.pool.maxExpiryTime=3600
torque.dsfactory.default.pool.connectionWaitTimeout=10

### My Dev Data DB
torque.dsfactory.devDB.connection.driver =
com.microsoft.jdbc.sqlserver.SQLServerDriver
torque.dsfactory.devDB.connection.url =
jdbc:microsoft:sqlserver://<servername2>:1433;databaseName=<dbName2>;SelectM
ethod=cursor
torque.dsfactory.devDB.connection.user =  <username2>
torque.dsfactory.devDB.connection.password = <password2>
torque.dsfactory.devDB.factory=org.apache.torque.dsfactory.TorqueDataSourceF
actory
# The number of database connections to cache per ConnectionPool instance
(specified per database)
torque.dsfactory.devDB.pool.defaultMaxConnections=10
torque.dsfactory.devDB.pool.maxExpiryTime=3600
torque.dsfactory.devDB.pool.connectionWaitTimeout=10
### end torque.properties file

Then, in your portlet registry entry add this parameter, otherwise it will
use the default:

<parameter name="poolname" value="devDB" hidden="true"/>

Hope this helps-
Josh

-----Original Message-----
From: Stuart Belden [mailto:[EMAIL PROTECTED]
Sent: Friday, August 08, 2003 12:08 PM
To: [EMAIL PROTECTED]
Subject: Re: HOw to Connect two different database ?


You'll need to configure torque to use two separate databases; see their
documentation and user lists.  You may need to extend the db browser portlet
to use something other than the default Torque connection; I've never used
it and can't say for sure.

>>> [EMAIL PROTECTED] 08/06/03 12:18AM >>>
Hello All, 
            I wanted to create a database portlet fetching records from
mysql , i made necessary changes in tourque.properties and ,connected it
with mysql and was able to fetch records , but i also need another database
portlet which connects with oracle database , is there any way to make two
different database connections available for database portlets , and how to
refer those connection. 

thanks in advance.
-kri$hnan


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to