Brad Maxwell created WFLY-12114:
-----------------------------------
Summary: Ability to configure configure an EJB to not be pooled
Key: WFLY-12114
URL:
https://issues.jboss.org/browse/WFLY-12114
Project: WildFly
Issue Type: Feature Request
Components: EJB
Reporter: Brad Maxwell
Assignee: Cheng Fang
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.
{code}
<stateless>
<bean-instance-pool-ref
pool-name="slsb-strict-max-pool"/>
</stateless>
{code}
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.
{code}
/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
}
{code}
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()
--
This message was sent by Atlassian Jira
(v7.12.1#712002)