db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andras Balogh <and...@reea.net>
Subject SharedPoolDataSourceFactory problem
Date Mon, 28 Aug 2006 09:54:57 GMT

We have developed a web application with Torque3-2.
We have tested the scenario of stopping the DB server than restarting. 
The web application should "discover" that
the Connections in the pool are broken, drop them and create new ones.
For this we used these value torque.properties:

torque.dsfactory.bookstore.pool.validationQuery=SELECT 1

As described here:

This is not working as expected, we see this in our log:

Property: testOnBorrow value: true is not supported by DataSource: 
Property: validationQuery value: SELECT 1 is not supported by 
DataSource: org.apache.commons.dbcp.datasources.SharedPoolDataSource

I see the properties are passed to the apache dbcp datasource in this 
AbstractDataSourceFactory.setProperty but I don't know where should be 
the error, the error is catched but the stack trace is not provided olny 
an error
in the log.

So there is no way to tell Torque to check for connections in the pool 
and drop them if they are invalid.
Can we set these properties somehow using the Torque class at runtime 
directly from code?
Can we ask for the current DataSource somehow from Torque?


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

View raw message