I have encountered an issue, that is, tomcat jdbc pool cooperating with hibernate caches query results, but I have banned hibernate's cache.
But when I switch jdbc pool to DBCP, the issue get disappeared. So I ensure that there's a query result cache in tomcat jdbc pool, but I haven't found any documents on this issue.
Could someone tell me how to close the query cache in tomcat jdbc pool ? it runs in tomcat-jdbc-7.0.47 and there is the configuration below.
<bean id="dataSource" class="org.apache.tomcat.jdbc.pool.DataSource" destroy-method="close">
<property name="driverClassName" value="com.mysql.jdbc.Driver"/>
<property name="url"
value="jdbc:mysql://192.168.1.104:3306/uip_test_1?useUnicode=true&characterEncoding=UTF8&zeroDateTimeBehavior=convertToNull"/>
<property name="username" value="root"/>
<property name="password" value="root"/>
<property name="defaultAutoCommit" value="false"/>
<!--<property name="initialSize" value="10" />-->
<property name="maxActive" value="40"/>
<property name="maxIdle" value="10"/>
<property name="maxWait" value="60000"/>
<property name="testOnBorrow" value="true"/>
<property name="timeBetweenEvictionRunsMillis" value="3600000"/>
<property name="testWhileIdle" value="true"/>
<property name="validationQuery" value="select 1 from dual"/>
</bean>