title: Can I change the maxActive property of a org.apache.tomcat.jdbc.pool.DataSource dynamically?
body: <p>I have a webapp running with a Groovy console attached.</p>
  
  <p>I have the following bean configured via XML:</p>
  
  <pre><code>&lt;bean id="dataSource" class="org.apache.tomcat.jdbc.pool.DataSource"&gt;
          &lt;property name="driverClassName" value="${db.driverClass}"/&gt;
          &lt;property name="url" value="${db.url}"/&gt;
          &lt;property name="username" value="${db.username}"/&gt;
          &lt;property name="password" value="${db.password}"/&gt;
          &lt;property name="validationQuery" value="${db.validationQuery}" /&gt;
          &lt;property name="testOnBorrow" value="true" /&gt;
          &lt;property name="testWhileIdle" value="true" /&gt;
          &lt;property name="timeBetweenEvictionRunsMillis" value="1800000" /&gt;
          &lt;property name="numTestsPerEvictionRun" value="8" /&gt;
          &lt;property name="removeAbandoned" value="true"/&gt;
          &lt;property name="logAbandoned" value="true"/&gt;
          &lt;property name="removeAbandonedTimeout" value="60"/&gt;
  
          &lt;!--connection pooling props --&gt;
          &lt;property name="maxActive" value="${db.maxActive}"/&gt;
          &lt;property name="maxIdle" value="${db.maxIdle}"/&gt;
          &lt;property name="maxAge" value="${db.maxAge}"/&gt;
          &lt;property name="maxWait" value="${db.maxWait}"/&gt;
          &lt;property name="initialSize" value="${db.initialSize}"/&gt;
          &lt;property name="minIdle" value="${db.minIdle}"/&gt;
      &lt;/bean&gt;
  </code></pre>
  
  <p>Via the Groovy console, I can easily call:</p>
  
  <pre><code>appCtx.getBean("dataSource").setMaxActive(someNumber);
  </code></pre>
  
  <p>where <code>appCtx</code> is my Spring application context.</p>
  
  <p>My question is, will this <em>actually</em> change the connection pool behaviour. All the links I've found seem to focus on initial configuration. I'm trying to modify configuration after the pool is established.</p>