1 Reply Latest reply on Mar 28, 2019 8:40 AM by mleite

    MDB Custom Pool

    mleite

      Hi, there.

       

      I'd like to have your help to understand the situation below. I could not find any final explanation at the docs.

       

      I need to set up a custom mdb-pool with around 50 instances, but could not figure out why, and would like to know if it is really not possible.

       

      When I start my Wildfly (standalone mode) I can see the following logging outputs.

       

      WFLYIO001: Worker 'default' has auto-configured to 8 core threads with 64 task threads based on your 4 available processors

      WFLYEJB0482: Strict pool mdb-strict-max-pool is using a max instance size of 16 (per class), which is derived from the number of CPUs on this host.

      WFLYEJB0481: Strict pool slsb-strict-max-pool is using a max instance size of 64 (per class), which is derived from thread worker pool sizing.

       

      Based on that I concluded that I can only have 16 instances at maximum per MDB. So I made the following tests.

       

      I've created a custom pool with 50 max instances.

      /subsystem=ejb3/strict-max-bean-instance-pool=my-pool:add(max-pool-size=50)

       

      Created a simple MDB and made the following tests.

       

      1 - No special settings related to pooling/instances

      I got 15 instances at a time.

       

      2 - Using the @ActivationConfigProperty (maxSession=50)

      I got 16 instances (same value defined in mdb-strict-max-pool).

       

      3 - Using only @Pool("my-pool")

      I got 15 instances at a time. Looks my custom pool is not taken into account.

       

      4 - Using the @Pool("my-pool") plus the @ActivationConfigProperty (maxSession=50)

      I got 32 instances at a time. Double the value of mdb-strict-max-pool.

       

      Looks the maximum possible value is really two times mdb-strict-max-pool and I can not increase that number.

       

      Could you tell me if it is really like that?

       

      Thanks in advance,

      Marcelo Leite