title: How does tomcat jdbc pool cache the query results?
body: <p>I have encountered an issue, that is, tomcat jdbc pool cooperating with hibernate caches query results, but I have banned hibernate's cache. </p>
  
  <p>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.</p>
  
  <p>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.</p>
  
  <pre><code>&lt;bean id="dataSource" class="org.apache.tomcat.jdbc.pool.DataSource" destroy-method="close"&gt;
      &lt;property name="driverClassName" value="com.mysql.jdbc.Driver"/&gt;
      &lt;property name="url"
                value="jdbc:mysql://192.168.1.104:3306/uip_test_1?useUnicode=true&amp;amp;characterEncoding=UTF8&amp;amp;zeroDateTimeBehavior=convertToNull"/&gt;
      &lt;property name="username" value="root"/&gt;
      &lt;property name="password" value="root"/&gt;
      &lt;property name="defaultAutoCommit" value="false"/&gt;
      &lt;!--&lt;property name="initialSize" value="10" /&gt;--&gt;
      &lt;property name="maxActive" value="40"/&gt;
      &lt;property name="maxIdle" value="10"/&gt;
      &lt;property name="maxWait" value="60000"/&gt;
      &lt;property name="testOnBorrow" value="true"/&gt;
      &lt;property name="timeBetweenEvictionRunsMillis" value="3600000"/&gt;
      &lt;property name="testWhileIdle" value="true"/&gt;
      &lt;property name="validationQuery" value="select 1 from dual"/&gt;
  &lt;/bean&gt;
  </code></pre>