OracleDataSource and validationQuery
I was wondering does the class oracle.jdbc.pool.OracleDataSource offer the user the option of specifying a validation query? I was looking in the api but couldnt find anything
I 开发者_高级运维noticed org.apache.commons.dbcp.BasicDataSource offers a validationQuery but for 2 of my datasources, I need to use the OracleDataSource
The solition was to set a connectionCacheProperty on our connection
<property name="connectionCacheProperties">
<map>
<entry key="ValidateConnection" value="true" />
</map>
</property>
精彩评论