title: How to restrict the ejb mdb(messsage driven beans) instances via wildfly 10 standalone-full.xml
body: <p>We have the following configuration in standalone-full.xml of wildfly10.</p>
  
  <pre><code> &lt;subsystem xmlns="urn:jboss:domain:ejb3:4.0"&gt;
              &lt;session-bean&gt;
                  &lt;stateless&gt;
                      &lt;bean-instance-pool-ref pool-name="slsb-strict-max-pool"/&gt;
                  &lt;/stateless&gt;
                  &lt;stateful default-access-timeout="5000" cache-ref="simple" passivation-disabled-cache-ref="simple"/&gt;
                  &lt;singleton default-access-timeout="5000"/&gt;
              &lt;/session-bean&gt;
              &lt;mdb&gt;
                  &lt;resource-adapter-ref resource-adapter-name="${ejb.resource-adapter-name:activemq-ra.rar}"/&gt;
                  &lt;bean-instance-pool-ref pool-name="mdb-strict-max-pool"/&gt;
              &lt;/mdb&gt;
              &lt;pools&gt;
                  &lt;bean-instance-pools&gt;
                      &lt;strict-max-pool name="slsb-strict-max-pool" derive-size="from-worker-pools" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/&gt;
                      &lt;strict-max-pool name="mdb-strict-max-pool" derive-size="from-cpu-count" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/&gt;
                      &lt;strict-max-pool name="ExchangeMessagePool" max-pool-size="10" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/&gt;
                      &lt;/bean-instance-pools&gt;
              &lt;/pools&gt;
              &lt;/subsystem&gt;
  </code></pre>
  
  <p>We have the following message driven bean which is linked with exchange message pool.In the standalone-full.xml  we have set the max-pool-size as 10 but the number of instances getting created during the server startup is 30 but I don't know where it is coming from.Is there any way can we restrict this.If there is any way to restrict the number of concurrent threads accessing this bean in standalone-full file.</p>
  
  <pre><code>@MessageDriven(name = "ExchangeMessage", activationConfig = {@ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"), @ActivationConfigProperty(propertyName = "destination", propertyValue = "jms/queue/ExchangeMessageQueue")})
  @PermitAll
  @Pool("ExchangeMessagePool")
  @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
  @TransactionManagement(TransactionManagementType.CONTAINER)
  public class ExchangeMessageBean implements MessageListener
  {
  ...
  }
  </code></pre>