db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eustache <eustache.fel...@idilia.com>
Subject Re: exception thrown because DB connection not correctly reinited after db server restart
Date Wed, 10 Jan 2007 17:10:15 GMT
adding this lines to the torque.properties make it work (checks that 
connection is ok before using it):

torque.dsfactory.web_test_suite.pool.defaultMaxActive=30
torque.dsfactory.web_test_suite.pool.testOnBorrow=true
torque.dsfactory.web_test_suite.pool.validationQuery=SELECT 1

Eustache wrote:

> Hi, I wonder if you can help with the following problem:
> I use Tomcat 5.5, postgresql 8.3.1 and Torque.
> I first use the webapp using torque everything is ok. I close the app, 
> a db connection is still there.
> Now I reboot db. Try to relaunch the webapp and has this exception in 
> catalina.out:
>
> DEBUG org.apache.torque.util.SQLBuilder - SELECT 
> app_category.CATEGORY_ID, app_category.NAME FROM app_category WHERE 
> app_category.CATEGORY_ID=1028
> org.apache.torque.TorqueException: org.postgresql.util.PSQLException: 
> An I/O error occured while sending to the backend.
>
> [torque.properties]
> torque.database.default=web_test_suite
> torque.database.web_test_suite.adapter = postgresql
> torque.dsfactory.web_test_suite.factory = 
> org.apache.torque.dsfactory.SharedPoolDataSourceFactory
> torque.dsfactory.web_test_suite.connection.driver = org.postgresql.Driver
> torque.dsfactory.web_test_suite.connection.url = 
> jdbc:postgresql://myserver/mydb
> torque.dsfactory.web_test_suite.connection.user = myuser
> torque.dsfactory.web_test_suite.connection.password =
>
> It seems that torque is not able to get a proper db connection after 
> the db server is restarted
> Any clue ?
>
> ---------------------------------------------------------------------
> 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