John,
Thanks for posting the solution. We may add such check to Cayenne pool
(maybe like "select 1 from dual" or something). For now I may put it in
the FAQ.
I still have a feeling that such check defeats the purpose of connection
pooling though... Need to do some profiling someday.
Andrus
> In case anyone else has this problem,
> this setup in server.xml corrected the issue we were having with
> database connection timeouts to Oracle.
> I.e. Adding the Validation query does the same thing as adding
> "?autoReconnect=true" to a MySQL url.
>
> John
>
> ------------------------------------------------------------------
> <Resource name="jdbc/pixx" auth="Container" type="javax.sql.DataSource"
> />
> - <ResourceParams name="jdbc/pixx">
> - <parameter>
> <name>factory</name>
> <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
> </parameter>
> - <parameter>
> <name>driverClassName</name>
> <value>oracle.jdbc.driver.OracleDriver</value>
> </parameter>
> - <parameter>
> <name>url</name>
> <value>jdbc:oracle:thin..vro:1521:pixx</value>
> </parameter>
> - <parameter>
> <name>username</name>
> <value>username</value>
> </parameter>
> - <parameter>
> <name>password</name>
> <value>password</value>
> </parameter>
> - <parameter>
> <name>maxActive</name>
> <value>20</value>
> </parameter>
> - <parameter>
> <name>maxIdle</name>
> <value>10</value>
> </parameter>
> - <parameter>
> <name>maxWait</name>
> <value>-1</value>
> </parameter>
> - <parameter>
> <name>validationQuery</name>
> <value>select * from global_name</value>
> </parameter>
> </ResourceParams>
>
>
This archive was generated by hypermail 2.0.0 : Wed Feb 26 2003 - 11:25:36 EST