2

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.

The error I’ve been receiving is this:
"WFLYCTL0105: max-pool-size is invalid in combination with derive-size".
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.

  • From the latest Thorntail dococumentation:
    Specifies if and what the max pool size should be derived from. An undefined value (or the deprecated value 'none' which is converted to undefined) indicates that the explicit value of max-pool-size should be used.

This is what I had previously in WildFly project-defaults.yml which worked perfectly fine:

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

Any ideas or examples would be greatly appreciated.

More information added in response to questions:

The project was updated from using WildFly Swarm 2018.4.1 to use Thorntail 2.2.0.Final.

The code that appears to have changed in Thorntail is below:

OLD code: https://github.com/stuartwdouglas/wildfly-swarm-core/blob/master/ejb/api/src/main/java/org/wildfly/swarm/ejb/EJBFraction.java

.strictMaxBeanInstancePool(new StrictMaxBeanInstancePool("mdb-strict-max-pool").maxPoolSize(20).timeout(5L).timeoutUnit(StrictMaxBeanInstancePool.TimeoutUnit.MINUTES))

New Code: https://github.com/thorntail/thorntail/blob/802e785fdd515ecc1b52b22a64a6ff9338dace29/fractions/javaee/ejb/src/main/java/org/wildfly/swarm/ejb/EJBFraction.java

.strictMaxBeanInstancePool(new StrictMaxBeanInstancePool("mdb-strict-max-pool").deriveSize(StrictMaxBeanInstancePool.DeriveSize.FROM_CPU_COUNT).timeout(5L).timeoutUnit(StrictMaxBeanInstancePool.TimeoutUnit.MINUTES))

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.

dee dubya
  • 23
  • 5
  • I'm pretty sure the source code is available -- you just need to note that Thorntail (formerly WildFly Swarm) is derived from the WildFly application server. A lot of the fractions are just a thin layer on top of WildFly subsystems, and configuration is also directly translated to WildFly configuration. The error you're getting also comes directly from WildFly. The WildFly version on which Thorntail is based didn't change for a while, but it would help anyway if you could detail from which version to which you upgraded when you started getting the error. – Ladicek Sep 14 '18 at 06:25
  • Thanks for you response. I'll add more to the question. – dee dubya Sep 16 '18 at 22:12

1 Answers1

1

After the question update: the default configuration of a couple of fractions was changed to better align with default configuration in WildFly 11. You can configure derive-size: null and then the max-pool-size should take effect.

Something like:

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:
      derive-size: null
      max-pool-size: 1

(Note: previously, this answer recommended setting derive-size: none, but that doesn't work. After the discussion in comments, I changed the answer to recommend derive-size: null, which does work.)

Ladicek
  • 5,970
  • 17
  • 20
  • Thanks again for getting back to me. Unfortunately, when I try this I get the following error: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.IllegalArgumentException: Invalid value 'none'; should be one of: from-worker-pools,from-cpu-count – dee dubya Sep 18 '18 at 00:17
  • Hmm, `none` should have worked. I'm not sure if we have a way to unset a configuration property... Could you try `derive-size: null`? – Ladicek Sep 18 '18 at 08:21
  • Adding the derive-size: null has worked to get it to compile and run the health check. I'll test further over the next few days and let you know how it goes however at this stage it's looking good thanks for your help. – dee dubya Sep 18 '18 at 23:28
  • Cool, thanks! Please let me know and I will edit this answer to be correct. – Ladicek Sep 19 '18 at 07:55
  • Testing completed and the solution is to set derive-size: null. Thanks for the solution to the problem. – dee dubya Sep 20 '18 at 03:06
  • Thanks, I changed the answer to use the correct `null` value. – Ladicek Sep 20 '18 at 07:16