title: Tomcat connection pooling, maxActive and maxWait properties
body: <p>I have a Java service running in Tomcat that uses Tomcat's <code>DataSource</code> and <code>PoolProperties</code> from org.apache.tomcat.jdbc.pool as in the <a href="https://tomcat.apache.org/tomcat-8.0-doc/jdbc-pool.html#Plain_Ol&#39;_Java" rel="noreferrer">"Plain Ol' Java" example</a>.</p>
  
  <p>In the stage environment that has Tomcat 8.0.29 I noticed the following 2 lines in the Catalina log.</p>
  
  <pre><code>WARNING [localhost-startStop-1] org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory.getObjectInstance Name = somedb Property maxActive is not used in DBCP2, use maxTotal instead. maxTotal default value is 8. You have set value of "50" for "maxActive" property, which is being ignored.
  WARNING [localhost-startStop-1] org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory.getObjectInstance Name = somedb Property maxWait is not used in DBCP2 , use maxWaitMillis instead. maxWaitMillis default value is -1. You have set value of "10000" for "maxWait" property, which is being ignored.
  </code></pre>
  
  <p>I don't see such log entries in the dev environment that has Tomcat 8.0.21.</p>
  
  <p>I cannot set up the datasource as a JNDI resource and I don't see any setters corresponding to maxTotal and maxWaitMillis in <code>PoolProperties</code>. </p>
  
  <p>How can I set those values so that they are not ignored?</p>