db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Eade <se...@backstagetech.com.au>
Subject Re: [repost] Re: Configuring SharedPoolDataSourceFactory
Date Tue, 09 Sep 2003 00:24:22 GMT
Here is what I have:

> torque.applicationRoot = .
> torque.earlyInit = true
> torque.database.default=ppdb
> torque.database.ppdb.adapter=mysql
>
> # Using commons-dbcp
> torque.dsfactory.ppdb.factory=\
>   org.apache.torque.dsfactory.SharedPoolDataSourceFactory
> torque.dsfactory.ppdb.pool.defaultMaxActive=3
> torque.dsfactory.ppdb.pool.testOnBorrow=true
> torque.dsfactory.ppdb.pool.validationQuery=SELECT 1
> torque.dsfactory.ppdb.connection.driver = org.gjt.mm.mysql.Driver
> torque.dsfactory.ppdb.connection.url = jdbc:mysql://127.0.0.1/xxconv
> torque.dsfactory.ppdb.connection.user = user
> torque.dsfactory.ppdb.connection.password = password
>
> torque.idbroker.cleverquantity=true
> torque.manager.useCache = true

To be clear, Torque does actually start and operates correctly.
The issue is that the three "pool" lines produce error messages
in the log.

The testOnBorrow and validationQuery values specified above are
actually the defaults so there is no real drama there.  The
defaultMaxActive is however different to the default (which
doesn't limit the number of active connections), so this one
is more important to me.

So the errors don't appear in your log?

Thanks,

Scott

Martin Poeschl wrote:

> this is the default config i'm using for mysql ... works for me, so 
> there seems to be a problem in your config  ... could you please send 
> your complete properties file?
>
> martin
>
> torque.dsfactory.bookstore.factory=org.apache.torque.dsfactory.SharedPoolDataSourceFactory

>
> torque.dsfactory.bookstore.pool.defaultMaxActive=10
> torque.dsfactory.bookstore.pool.testOnBorrow=true
> torque.dsfactory.bookstore.pool.validationQuery=SELECT 1
> torque.dsfactory.bookstore.connection.driver = org.gjt.mm.mysql.Driver
> torque.dsfactory.bookstore.connection.url = 
> jdbc:mysql://localhost:3306/torque
> torque.dsfactory.bookstore.connection.user = user
> torque.dsfactory.bookstore.connection.password = password
>
>
> Scott Eade wrote:
>
>> Anyone (martin?) have an answer to my query below?
>>
>> Scott Eade wrote:
>>
>>> In the SharedPoolDataSourceFactory section of
>>> http://db.apache.org/torque/configuration-howto.html the
>>> configuration of the pool is shown thus:
>>>
>>>    torque.dsfactory.bookstore.pool.defaultMaxActive=30
>>>    torque.dsfactory.bookstore.pool.testOnBorrow=true
>>>    torque.dsfactory.bookstore.pool.validationQuery=SELECT 1
>>>
>>> For me this results in the following appearing in my log file:
>>>
>>> ...ERROR...dsfactory.AbstractDataSourceFactory - Property: 
>>> defaultMaxActive value: 3 is not supported by DataSource: 
>>> org.apache.commons.dbcp.datasources.SharedPoolDataSource
>>> ...ERROR...dsfactory.AbstractDataSourceFactory - Property: 
>>> testOnBorrow value: true is not supported by DataSource: 
>>> org.apache.commons.dbcp.datasources.SharedPoolDataSource
>>> ...ERROR...dsfactory.AbstractDataSourceFactory - Property: 
>>> validationQuery value: SELECT 1 is not supported by DataSource: 
>>> org.apache.commons.dbcp.datasources.SharedPoolDataSource
>>>
>>> Is this something I am doing wrong or is there a problem
>>> somewhere in org.apache.torque.dsfactory.SharedPoolDataSourceFactory?
>>>
>>> Thanks,
>>>
>>> Scott
>>




---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message