开发者

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜