开发者

OracleDataSource and validationQuery

开发者 https://www.devze.com 2023-03-14 13:15 出处:网络
I was wondering does the class oracle.jdbc.pool.OracleDataSource offer the user the option of specifying a validation query?

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>
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号