title: max-pool-size is invalid in combination with derive-size
body: <p>For the last couple of days I’ve been battling with an issue which I believe is derived from a change in the source code in Thorntail and unfortunately this code doesn’t appear to be publically available.  </p>
  
  <p>The error I’ve been receiving is this:<br>
  <strong>"WFLYCTL0105: max-pool-size is invalid in combination with derive-size"</strong>.<br>
  Previously you could just leave a “derive-size” out of the configuration and there wasn’t an issue however now anytime I’ve included the “max-pool-size” no matter what the combination with “derive-size” it fails with the above mentioned error.</p>
  
  <ul>
  <li>From the latest Thorntail dococumentation:<br>
  Specifies if and what the max pool size should be derived from. An
  undefined value (or the <strong>deprecated</strong> value 'none' which is converted to
  undefined) indicates that the explicit value of max-pool-size should
  be used.</li>
  </ul>
  
  <p>This is what I had previously in WildFly project-defaults.yml which worked perfectly fine:</p>
  
  <pre><code>ejb3:
      default-resource-adapter-name: activemq-rar.rar
      default-mdb-instance-pool: mdb-strict-max-pool
      strict-max-bean-instance-pools:
        mdb-strict-max-pool:
          max-pool-size: 1
  </code></pre>
  
  <p>Any ideas or examples would be greatly appreciated.</p>
  
  <p>More information added in response to questions:</p>
  
  <p>The project was updated from using WildFly Swarm 2018.4.1 to use Thorntail 2.2.0.Final.</p>
  
  <p>The code that appears to have changed in Thorntail is below:</p>
  
  <p><strong>OLD code</strong>:
  <a href="https://github.com/stuartwdouglas/wildfly-swarm-core/blob/master/ejb/api/src/main/java/org/wildfly/swarm/ejb/EJBFraction.java" rel="nofollow noreferrer">https://github.com/stuartwdouglas/wildfly-swarm-core/blob/master/ejb/api/src/main/java/org/wildfly/swarm/ejb/EJBFraction.java</a></p>
  
  <pre><code>.strictMaxBeanInstancePool(new StrictMaxBeanInstancePool("mdb-strict-max-pool").maxPoolSize(20).timeout(5L).timeoutUnit(StrictMaxBeanInstancePool.TimeoutUnit.MINUTES))
  </code></pre>
  
  <p><strong>New Code</strong>:
  <a href="https://github.com/thorntail/thorntail/blob/802e785fdd515ecc1b52b22a64a6ff9338dace29/fractions/javaee/ejb/src/main/java/org/wildfly/swarm/ejb/EJBFraction.java" rel="nofollow noreferrer">https://github.com/thorntail/thorntail/blob/802e785fdd515ecc1b52b22a64a6ff9338dace29/fractions/javaee/ejb/src/main/java/org/wildfly/swarm/ejb/EJBFraction.java</a></p>
  
  <pre><code>.strictMaxBeanInstancePool(new StrictMaxBeanInstancePool("mdb-strict-max-pool").deriveSize(StrictMaxBeanInstancePool.DeriveSize.FROM_CPU_COUNT).timeout(5L).timeoutUnit(StrictMaxBeanInstancePool.TimeoutUnit.MINUTES))
  </code></pre>
  
  <p>If anyone has a link to the above source code that would be great.  The only links I can find appear to be from JBOSS so the code looks like it was ported accross and not made publicly avaiable.</p>