I'm using ejb3.1 and I would like to define the minimum and maximum number of instances of a stateless session bean. How can I do this?
Thanks.
I'm using ejb3.1 and I would like to define the minimum and maximum number of instances of a stateless session bean. How can I do this?
Thanks.
You will need to declare this into the server's configuration. Each server has its own way to declare the max number of instances.
For example, if your are using Wildfly server you will need to declare this into standalone.xml:
<strict-max-pool name="slsb-strict-max-pool" max-pool-size="32" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>
As far as I know, you can't declare the minimum of instances into Wildfly. However it will depend on the server that you are using