Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-12114

Ability to configure configure an EJB to not be pooled

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • None
    • EJB
    • None

      Ability to configure configure an EJB to not be pooled

      Currently SLSB/MDB's by default use the strict-max-pool configuration and an EJB can use @Pool or jboss-ejb3.xml to specify that a particular EJB use a different pool configuration.

      If the default pool configuration is removed, for example, removing the bean-instance-pool-ref in the ejb3 subsystem from the stateless, would change the default pool configuration use to be none. Then the default for all EJBs is to create an EJB instance on demand when needed and destroy it when done. And then particular EJBs could then use @Pool or jboss-ejb3.xml to specify a pool configuration to use if instance on demand is not wanted.

      It would be good if there was a way to configure the reverse, where in there is a default pool configuration for the EJBs and then a particular EJB could use @Pool or jboss-ejb3.xml to specify instance on demand.

                      <stateless>
                          <bean-instance-pool-ref pool-name="slsb-strict-max-pool"/>
                      </stateless>
      

      Currently it does not look like there is a way to create a configuration that is instance on demand and strict-max-bean-instance-pool does not allow a max-pool-size of 0.

      /subsystem=ejb3/strict-max-bean-instance-pool=nopool:add(max-pool-size=0)
      {
          "outcome" => "failed",
          "failure-description" => "WFLYCTL0117: 0 is an invalid value for parameter max-pool-size. A minimum value of 1 is required",
          "rolled-back" => true
      }
      

      So if we had a way to create a pool config where it is instance-on-demand such to indicate there is no pool, then user could use @Pool or jboss-ejb3.xml to use the no-pool. Since there are not really any config for the instance-on-demand, it could just be a constant config, though it is nice when the standalone.xml shows options that are available.

      /subsystem=ejb3/instance-on-demand-bean-instance-pool=no-pool:add()

            tadamski@redhat.com Tomasz Adamski
            rhn-support-bmaxwell Brad Maxwell
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: