db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anil Kumar <an...@slb.com>
Subject Re: Jdbc2
Date Thu, 21 Aug 2003 02:29:39 GMT
I have configured the jdbc2pool for Oracle.

Here is my config.

torque.database.default=testDB

torque.database.testDB.adapter=oracle

## Using torque's old pool

#torque.dsfactory.testDB.factory=org.apache.torque.dsfactory.TorqueDataSourc
eFactory

#torque.dsfactory.testDB.pool.defaultMaxConnections=10

#torque.dsfactory.testDB.pool.maxExpiryTime=3600

#torque.dsfactory.testDB.pool.connectionWaitTimeout=10

#torque.dsfactory.testDB.connection.driver = oracle.jdbc.driver.OracleDriver

torque.dsfactory.testDB.factory=org.apache.torque.dsfactory.Jdbc2PoolDataSou
rceFactory

torque.dsfactory.testDB.pool.defaultMaxActive=30

torque.dsfactory.testDB.pool.testOnBorrow=true

torque.dsfactory.testDB.pool.minEvictableIdleTimeMillis=300000

torque.dsfactory.testDB.pool.timeBetweenEvictionRunsMillis=600000

torque.dsfactory.testDB.pool.defaultMaxIdle=10

##torque.dsfactory.testDB.pool.validationQuery=select 1

torque.dsfactory.testDB.connection.driver=oracle.jdbc.driver.OracleDriver

torque.dsfactory.testDB.connection.url=jdbc:oracle:thin:@localhost:1521:hsed
b

torque.dsfactory.testDB.connection.user=hse

torque.dsfactory.testDB.connection.password=hse

##-----------------End------------------------------------

I had problems when I used the validation query. I am not using it now. But
i do not have

connection leak issue anymore. We have not re-started oracle for almost 3
weeks now.

Hope this helps.

Anil



----- Original Message -----
From: "CP Lim" <cp_lim@redsheriff.com>
To: "Apache Torque Users List" <torque-user@db.apache.org>
Sent: Wednesday, August 20, 2003 4:58 PM
Subject: Re: Jdbc2


> Hi Samuel,
>
> I've experienced these connection leaks first hand, and since moving to
> jdbc2 pool, it's disappeared altogether.  Highly recommend moving to it.
>
> I believe the following should work:
>
> --------------------------------------
> torque.database.default=my_db
> torque.database.my_db.adapter=oracle
>
>
torque.dsfactory.my_db.factory=org.apache.torque.dsfactory.Jdbc2PoolDataSour
ceFactory
> torque.dsfactory.my_db.pool.defaultMaxActive=20
> torque.dsfactory.my_db.pool.testOnBorrow=true
> torque.dsfactory.my_db.pool.validationQuery=SELECT sysdate from dual
> torque.dsfactory.my_db.connection.driver = oracle.jdbc.driver.OracleDriver
> torque.dsfactory.my_db.connection.url =
> jdbc:oracle:thin:@localhost:1521:my_db
> torque.dsfactory.my_db.connection.user = test
> torque.dsfactory.my_db.connection.password = test
> --------------------------------------
>
> (I believe) The validationQuery configuration is the SQL used to test to
> make sure a pooled Connection is still valid before being used by
> Torque.  So this will be different for different databases.  The default
> 'SELECT 1' works on PostgreSQL, so I'm suspecting that's the cause of
> your problems.
>
> For more info you might want to have a look at
> http://www.mail-archive.com/torque-user@db.apache.org/msg00631.html.
>
> Disclaimer:  I'm not using Oracle, but above configuration should
> work.... in theory ;).
>
> cheers,
> CP
>
> Samuel Le Berrigaud wrote:
>
> > Hi all,
> >
> > we work on a project using Turbine & Torque with Tomcat and an Oracle
> > Database. Since a few days we encountered a problem with the database.
> >
> > After a search on the list and other places, we found out that torque's
> > old pool has a possible connection leak. Does someone experienced that ?
> > and have some information ...
> >
> > So we may want to use the Jdbc2Pool, but we don't know the differnces
> > beetween those two pools and the way to configure the jdbc2 pool. Can
> > someone help and give some advice using or not the Jdbc2 pool, and the
> > to configure it ?
> >
> > Thanks,
> >
> > SaM
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> > For additional commands, e-mail: torque-user-help@db.apache.org
> >
> >
> >
>
> --
> R E D S H E R I F F
> C.P. Lim - Software Engineer
> [cp_lim@redsheriff.com]
>
> 96-98 Market St    +61 (3) 9606 4036 tel
> South Melbourne    +61 (3) 9606 4001 fax
> Victoria  3205     +61 (413) 781 846 cell
>
> This message and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they are
> addressed. If you are not the intended recipient, you are hereby
> notified that any use or dissemination of this communication is strictly
> prohibited. If you have received this message in error please notify us
> immediately by return email or telephone +61 (2) 8204 5888, then delete
> this message. Any views expressed in this message are those of the
> individual sender and many not necessarily reflect the views of Red
> Sheriff.
>
>
> ---------------------------------------------------------------------
> 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